@Override public long hash(int position, int offset, int length) { return block.hash(position, offset, length); }
@Override public long hash(int position, int offset, int length) { return block.hash(position, offset, length); }
@Override public long hash(Block block, int position) { return block.hash(position, 0, getFixedSize()); }
@Override public long hash(int position, int offset, int length) { assureLoaded(); return block.hash(position, offset, length); }
@Override public long hash(Block block, int position) { return block.hash(position, 0, block.getSliceLength(position)); }
@Override public long hash(Block block, int position) { return block.hash(position, 0, block.getSliceLength(position)); }
@Override public long hash(Block block, int position) { return block.hash(position, 0, block.getSliceLength(position)); }
@Override public long hash(Block block, int position) { return block.hash(position, 0, block.getSliceLength(position)); }
@Override public long hash(Block block, int position) { return block.hash(position, 0, block.getSliceLength(position)); }
@Override public long hash(int position, int offset, int length) { checkReadablePosition(position); return value.hash(0, offset, length); }
@Override public long hash(Block block, int position) { return block.hash(position, 0, getFixedSize()); }
@Override public long hash(int position, int offset, int length) { return dictionary.hash(getId(position), offset, length); }
@Override public long hash(Block block, int position) { return block.hash(position, 0, block.getSliceLength(position)); }
@Override public long hash(int position, int offset, int length) { checkReadablePosition(position); return getBlock().hash(position + start, offset, length); }
@Override public long hash(int position, int offset, int length) { checkFieldIndex(position); return getRawFieldBlock(position).hash(rowIndex, offset, length); }
@SuppressWarnings("unused") public static long blockVarcharHashCode(Block block, int position) { return block.hash(position, 0, block.getSliceLength(position)); } }
@SuppressWarnings("unused") public static long blockVarcharHashCode(Block block, int position) { return block.hash(position, 0, block.getSliceLength(position)); } }
/** * Get slot position of element at {@code position} of {@code block} */ private long getHashPositionOfElement(Block block, int position) { checkArgument(!block.isNull(position), "position is null"); int length = block.getSliceLength(position); long hashPosition = getMaskedHash(block.hash(position, 0, length)); while (true) { int blockPosition = blockPositionByHash.get(hashPosition); if (blockPosition == EMPTY_SLOT) { // Doesn't have this element return hashPosition; } else if (elementBlock.getSliceLength(blockPosition) == length && block.equals(position, 0, elementBlock, blockPosition, 0, length)) { // Already has this element return hashPosition; } hashPosition = getMaskedHash(hashPosition + 1); } }
/** * Get slot position of element at {@code position} of {@code block} */ private long getHashPositionOfElement(Block block, int position) { checkArgument(!block.isNull(position), "position is null"); int length = block.getSliceLength(position); long hashPosition = getMaskedHash(block.hash(position, 0, length)); while (true) { int blockPosition = blockPositionByHash.get(hashPosition); if (blockPosition == EMPTY_SLOT) { // Doesn't have this element return hashPosition; } else if (elementBlock.getSliceLength(blockPosition) == length && block.equals(position, 0, elementBlock, blockPosition, 0, length)) { // Already has this element return hashPosition; } hashPosition = getMaskedHash(hashPosition + 1); } }