presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/RaptorBucketFunction.java/RaptorBucketFunction/getBucket
class RaptorBucketFunction:    @SuppressWarnings("NumericCastThatLosesPrecision")
    @Override
    public int getBucket(Page page, int position)
    {
        long hash = 0;
        for (int i = 0; i < page.getChannelCount(); i++) {
            Block block = page.getBlock(i);
            long value = functions[i].hash(block, position);
            hash = (hash * 31) + value;
        }
        int value = (int) (hash & Integer.MAX_VALUE);
        return value % bucketCount;
    }