@SqlType(StandardTypes.BOOLEAN) public static boolean isDistinctFrom( @BlockPosition @SqlType(value = "unknown", nativeContainerType = boolean.class) Block left, @BlockIndex int leftPosition, @BlockPosition @SqlType(value = "unknown", nativeContainerType = boolean.class) Block right, @BlockIndex int rightNull) { return false; } }
@SqlType(StandardTypes.BOOLEAN) public static boolean isDistinctFrom( @BlockPosition @SqlType(value = "unknown", nativeContainerType = boolean.class) Block left, @BlockIndex int leftPosition, @BlockPosition @SqlType(value = "unknown", nativeContainerType = boolean.class) Block right, @BlockIndex int rightNull) { return false; } }
@SqlType(StandardTypes.BIGINT) public static long getBlockPosition(@BlockPosition @SqlType(value = StandardTypes.BIGINT, nativeContainerType = long.class) Block block, @BlockIndex int position) { hitBlockPositionBigint.set(true); return BIGINT.getLong(block, position); }
@InputFunction @TypeParameter(value = "T") public static void input(@AggregationState NullableLongState state, @BlockPosition @SqlType("T") Block block, @BlockIndex int index) { update(state, block.getEstimatedDataSizeForStats(index)); }
@InputFunction @TypeParameter(value = "T") public static void input(@AggregationState NullableLongState state, @BlockPosition @SqlType("T") Block block, @BlockIndex int index) { update(state, block.getEstimatedDataSizeForStats(index)); }
@InputFunction @TypeParameter(value = "T") public static void input(@AggregationState NullableLongState state, @BlockPosition @SqlType("T") Block block, @BlockIndex int index) { update(state, block.getEstimatedDataSizeForStats(index)); }
@InputFunction @TypeParameter(value = "T") public static void input(@AggregationState NullableLongState state, @BlockPosition @SqlType("T") Block block, @BlockIndex int index) { update(state, block.getEstimatedDataSizeForStats(index)); }
@SqlType(StandardTypes.DOUBLE) @SqlNullable public static Double getDouble(@BlockPosition @SqlType(value = StandardTypes.DOUBLE, nativeContainerType = double.class) Block block, @BlockIndex int position) { hitBlockPositionDouble.set(true); return DOUBLE.getDouble(block, position); } }
@SqlType(StandardTypes.DOUBLE) @SqlNullable public static Double getDouble(@BlockPosition @SqlType(value = StandardTypes.DOUBLE, nativeContainerType = double.class) Block block, @BlockIndex int position) { hitBlockPositionDouble.set(true); return DOUBLE.getDouble(block, position); } }
@InputFunction public static void input( @AggregationState NullableDoubleState state, @BlockPosition @SqlType(DOUBLE) Block value, @BlockIndex int id) { // noop this is only for annotation testing puproses }
@TypeParameter("E") @SqlType("E") public static Slice specializedSlice(@TypeParameter("E") Type type, @BlockPosition @SqlType(value = "E", nativeContainerType = Slice.class) Block block, @BlockIndex int position) { hitBlockPositionSlice.set(true); return type.getSlice(block, position); }
@TypeParameter("E") @SqlType("E") public static Slice specializedSlice(@TypeParameter("E") Type type, @BlockPosition @SqlType(value = "E", nativeContainerType = Slice.class) Block block, @BlockIndex int position) { hitBlockPositionSlice.set(true); return type.getSlice(block, position); }
@InputFunction @TypeParameter("T") public static void input( @OperatorDependency(operator = XX_HASH_64, returnType = StandardTypes.BIGINT, argumentTypes = {"T"}) MethodHandle methodHandle, @AggregationState HyperLogLogState state, @SqlType("T") long value) { ApproximateCountDistinctAggregation.input(methodHandle, state, value, DEFAULT_STANDARD_ERROR); }
@TypeParameter("E") @SqlNullable @SqlType("E") public static Object generic(@TypeParameter("E") Type type, @BlockPosition @SqlType("E") Block block, @BlockIndex int position) { hitBlockPositionObject.set(true); return readNativeValue(type, block, position); }
@TypeParameter("E") @SqlNullable @SqlType("E") public static Boolean speciailizedBoolean(@TypeParameter("E") Type type, @BlockPosition @SqlType(value = "E", nativeContainerType = boolean.class) Block block, @BlockIndex int position) { hitBlockPositionBoolean.set(true); return type.getBoolean(block, position); }
@TypeParameter("E") @SqlNullable @SqlType("E") public static Object generic(@TypeParameter("E") Type type, @BlockPosition @SqlType("E") Block block, @BlockIndex int position) { hitBlockPositionObject.set(true); return readNativeValue(type, block, position); }
@SqlType(StandardTypes.INTEGER) public static long addBlockPosition( @SqlType(StandardTypes.INTEGER) long first, @BlockPosition @SqlType(value = StandardTypes.INTEGER, nativeContainerType = long.class) Block block, @BlockIndex int position) { return Math.addExact((int) first, (int) INTEGER.getLong(block, position)); } }
@SqlType(StandardTypes.INTEGER) public static long addBlockPosition( @SqlType(StandardTypes.INTEGER) long first, @BlockPosition @SqlType(value = StandardTypes.INTEGER, nativeContainerType = long.class) Block block, @BlockIndex int position) { return Math.addExact((int) first, (int) INTEGER.getLong(block, position)); } }
@InputFunction public static void input(@AggregationState NullableLongState state, @BlockPosition @NullablePosition @SqlType(StandardTypes.BIGINT) Block block, @BlockIndex int position) { if (block.isNull(position)) { state.setLong(state.getLong() + 1); } state.setNull(false); }
@InputFunction public static void input(@AggregationState NullableLongState state, @BlockPosition @NullablePosition @SqlType(StandardTypes.BIGINT) Block block, @BlockIndex int position) { if (block.isNull(position)) { state.setLong(state.getLong() + 1); } state.setNull(false); }