int hash = KeyEncoder.getHashBucket(row, hashSchema); hashBuckets.set(hash);
/** * Encodes the provided row into a partition key according to the partition schema. * * @param row the row to encode * @param partitionSchema the partition schema describing the table's partitioning * @return an encoded partition key */ public static byte[] encodePartitionKey(PartialRow row, PartitionSchema partitionSchema) { ByteVec buf = ByteVec.create(); if (!partitionSchema.getHashBucketSchemas().isEmpty()) { for (final HashBucketSchema hashSchema : partitionSchema.getHashBucketSchemas()) { encodeHashBucket(getHashBucket(row, hashSchema), buf); } } encodeColumns(row, partitionSchema.getRangeSchema().getColumns(), buf); return buf.toArray(); }