presto-main/src/main/java/io/prestosql/operator/aggregation/histogram/GroupedTypedHistogram.java/BucketNodeFactory/createBucketDataNode
class BucketNodeFactory:        private BucketDataNode createBucketDataNode(long groupId, Block block, int position)
        {
            long valueHash = murmurHash3(TypeUtils.hashPosition(type, block, position));
            long groupIdHash = murmurHash3(groupId);
            long valueAndGroupHash = combineGroupAndValueHash(groupIdHash, valueHash);
            int bucketId = (int) (valueAndGroupHash & mask);
            int nodePointer;
            int probeCount = 1;
            int originalBucketId = bucketId;
            // look for an empty slot or a slot containing this group x key
            while (true) {
                nodePointer = buckets.get(bucketId);

                if (nodePointer == EMPTY_BUCKET) {
                    return new BucketDataNode(bucketId, new ValueNode(nextNodePointer), valueHash, valueAndGroupHash, nextNodePointer, true);
                }
                else if (groupAndValueMatches(groupId, block, position, nodePointer, valuePositions.get(nodePointer))) {
                    // value match
                    return new BucketDataNode(bucketId, new ValueNode(nodePointer), valueHash, valueAndGroupHash, nodePointer, false);
                }
                else {
                    // keep looking
                    int probe = nextProbe(probeCount);
                    bucketId = nextBucketId(originalBucketId, mask, probe);
                    probeCount++;
                }
            }
        }