@Override public int hashCode() { return (int) type.hash(block, 0); }
@Override public int hashCode() { return Long.hashCode(type.hash(block, position)); }
@Override public int hashCode() { int hash = Objects.hash(type, bound); if (valueBlock.isPresent()) { hash = hash * 31 + (int) type.hash(valueBlock.get(), 0); } return hash; }
public static long hashPosition(Type type, Block block, int position) { if (block.isNull(position)) { return NULL_HASH_CODE; } return type.hash(block, position); }
public static long hashPosition(Type type, Block block, int position) { if (block.isNull(position)) { return NULL_HASH_CODE; } return type.hash(block, position); }
static long hashPosition(Type type, Block block, int position) { if (block.isNull(position)) { return NULL_HASH_CODE; } return type.hash(block, position); }
@Override public int hashCode() { int hash = Objects.hash(type); if (value != null) { hash = hash * 31 + (int) type.hash(Utils.nativeValueToBlock(type, value), 0); } return hash; }
@UsedByGeneratedCode public static long hash(Type rowType, Block block) { BlockBuilder blockBuilder = rowType.createBlockBuilder(null, 1); blockBuilder.appendStructure(block); return rowType.hash(blockBuilder.build(), 0); } }
@UsedByGeneratedCode public static long hash(Type rowType, Block block) { BlockBuilder blockBuilder = rowType.createBlockBuilder(null, 1); blockBuilder.appendStructure(block); return rowType.hash(blockBuilder.build(), 0); } }
public static void input(Type type, NullableLongState state, Block block, int position) { state.setNull(false); if (block.isNull(position)) { state.setLong(state.getLong() + PRIME64); } else { state.setLong(state.getLong() + type.hash(block, position) * PRIME64); } }
public static void input(Type type, NullableLongState state, Block block, int position) { state.setNull(false); if (block.isNull(position)) { state.setLong(state.getLong() + PRIME64); } else { state.setLong(state.getLong() + type.hash(block, position) * PRIME64); } }
return type.hash(block, position);
return type.hash(block, position);
return type.hash(block, position);
private static SqlVarbinary expectedChecksum(Type type, Block block) { long result = 0; for (int i = 0; i < block.getPositionCount(); i++) { if (block.isNull(i)) { result += PRIME64; } else { result += type.hash(block, i) * PRIME64; } } return new SqlVarbinary(wrappedLongArray(result).getBytes()); } }
private static SqlVarbinary expectedChecksum(Type type, Block block) { long result = 0; for (int i = 0; i < block.getPositionCount(); i++) { if (block.isNull(i)) { result += PRIME64; } else { result += type.hash(block, i) * PRIME64; } } return new SqlVarbinary(wrappedLongArray(result).getBytes()); } }
@TypeParameter("T") @SqlType(StandardTypes.BIGINT) public static long oldHash( @OperatorDependency(operator = HASH_CODE, returnType = StandardTypes.BIGINT, argumentTypes = "T") MethodHandle hashFunction, @TypeParameter("T") Type type, @SqlType("array(T)") Block block) { int hash = 0; for (int i = 0; i < block.getPositionCount(); i++) { checkElementNotNull(block.isNull(i), ARRAY_NULL_ELEMENT_MSG); hash = (int) getHash(hash, type.hash(block, i)); } return hash; } }
@TypeParameter("T") @SqlType(StandardTypes.BIGINT) public static long oldHash( @OperatorDependency(operator = HASH_CODE, returnType = StandardTypes.BIGINT, argumentTypes = "T") MethodHandle hashFunction, @TypeParameter("T") Type type, @SqlType("array(T)") Block block) { int hash = 0; for (int i = 0; i < block.getPositionCount(); i++) { checkElementNotNull(block.isNull(i), ARRAY_NULL_ELEMENT_MSG); hash = (int) getHash(hash, type.hash(block, i)); } return hash; } }