if (catalog_param instanceof RandomProcParameter) {
partition = RandomProcParameter.rand.nextInt(this.num_partitions);
}
// Special Case: MultiProcParameter
else if (catalog_param instanceof MultiProcParameter) {
MultiProcParameter mpp = (MultiProcParameter) catalog_param;
if (debug.val)
LOG.debug(catalog_proc.getName() + " MultiProcParameter: " + mpp);
int hashes[] = new int[mpp.size()];
for (int i = 0; i < hashes.length; i++) {
int mpp_param_idx = mpp.get(i).getIndex();
assert (mpp_param_idx >= 0) : "Invalid Partitioning MultiProcParameter #" + mpp_param_idx;
assert (mpp_param_idx < params.length) : CatalogUtil.getDisplayName(mpp) + " < " + params.length;
int hash = this.calculatePartition(catalog_proc, params[mpp_param_idx], is_array);
hashes[i] = (hash == HStoreConstants.NULL_PARTITION_ID ? 0 : hash);
if (debug.val)
LOG.debug(mpp.get(i) + " value[" + params[mpp_param_idx] + "] => hash[" + hashes[i] + "]");
} // FOR
partition = this.hasher.multiValueHash(hashes);
if (debug.val)
LOG.debug(Arrays.toString(hashes) + " => " + partition);
}