@TypeParameter("K") @TypeParameter("V") public MapEntriesFunction(@TypeParameter("array(row(K,V))") Type arrayType) { pageBuilder = new PageBuilder(ImmutableList.of(arrayType)); }
@TypeParameter("K") @TypeParameter("V") public MapFromEntriesFunction(@TypeParameter("map(K,V)") Type mapType) { pageBuilder = new PageBuilder(ImmutableList.of(mapType)); }
@TypeParameter("T") public ArraySortComparatorFunction(@TypeParameter("T") Type elementType) { pageBuilder = new PageBuilder(ImmutableList.of(elementType)); }
@TypeParameter("E") public ArrayReverseFunction(@TypeParameter("E") Type elementType) { pageBuilder = new PageBuilder(ImmutableList.of(elementType)); }
@TypeParameter("T") public ConstructorInjectionScalarFunction(@TypeParameter("T") Type type) { this.type = type; }
@TypeParameter("K") @TypeParameter("V") @SqlType(StandardTypes.BIGINT) public static long mapCardinality(@SqlType("map(K,V)") Block block) { return block.getPositionCount() / 2; } }
@TypeParameter("T") @SqlType(StandardTypes.VARCHAR) public static Slice typeof( @TypeParameter("T") Type type, @SqlNullable @SqlType("T") Long value) { return typeof(type, (Object) value); }
@TypeParameter("T") @SqlType("T") @SqlNullable public static Long longArrayMax( @OperatorDependency(operator = GREATER_THAN, returnType = StandardTypes.BOOLEAN, argumentTypes = {"T", "T"}) MethodHandle compareMethodHandle, @TypeParameter("T") Type elementType, @SqlType("array(T)") Block block) { return longArrayMinMax(compareMethodHandle, elementType, block); }
@TypeParameter("T") @SqlType("T") @SqlNullable public static Long longArrayMin( @OperatorDependency(operator = LESS_THAN, returnType = StandardTypes.BOOLEAN, argumentTypes = {"T", "T"}) MethodHandle compareMethodHandle, @TypeParameter("T") Type elementType, @SqlType("array(T)") Block block) { return longArrayMinMax(compareMethodHandle, elementType, block); }
@TypeParameter("T") @SqlType("T") @SqlNullable public static Slice sliceArrayMin( @OperatorDependency(operator = LESS_THAN, returnType = StandardTypes.BOOLEAN, argumentTypes = {"T", "T"}) MethodHandle compareMethodHandle, @TypeParameter("T") Type elementType, @SqlType("array(T)") Block block) { return sliceArrayMinMax(compareMethodHandle, elementType, block); }
@TypeParameter("E") @SqlType("E") public static Object generic(@TypeParameter("E") Type type, @SqlType("E") Object input) { return input; }
@TypeParameter("E") @SqlType(StandardTypes.BIGINT) public static long arrayCardinality(@SqlType("array(E)") Block block) { return block.getPositionCount(); } }
@CombineFunction @TypeParameter("T1") @TypeParameter("T2") public static void combine( @TypeParameter("ROW(ARRAY(T1),ROW(ROW(T2)),CHAR)") Type type, @AggregationState NullableDoubleState state, @AggregationState NullableDoubleState otherState) { // noop this is only for annotation testing puproses }
@SqlType("T") @TypeParameter("T") public static double fun(@SqlType("T") double v) { return v; }
@SqlType("T") @TypeParameter("T") public static long fun(@SqlType("T") long v) { return v; } }
@SqlType(StandardTypes.BIGINT) public static long fun( @TypeParameter("ROW(ARRAY(BIGINT),ROW(ROW(CHAR)),BIGINT,MAP(BIGINT,CHAR))") Type type, @SqlType(StandardTypes.BIGINT) long value) { return value; } }
@InputFunction @TypeParameter("T") public static void input( @OperatorDependency(operator = XX_HASH_64, returnType = StandardTypes.BIGINT, argumentTypes = {"T"}) MethodHandle methodHandle, @AggregationState HyperLogLogState state, @SqlType("T") Slice value) { ApproximateCountDistinctAggregation.input(methodHandle, state, value, DEFAULT_STANDARD_ERROR); }
public EmptyMapConstructor(@TypeParameter("map(unknown,unknown)") Type mapType) { BlockBuilder mapBlockBuilder = mapType.createBlockBuilder(null, 1); mapBlockBuilder.beginBlockEntry(); mapBlockBuilder.closeEntry(); emptyMap = ((MapType) mapType).getObject(mapBlockBuilder.build(), 0); }
@CombineFunction public static void combine( @TypeParameter("ROW(ARRAY(BIGINT),ROW(ROW(CHAR)),BIGINT,MAP(BIGINT,CHAR))") Type type, @AggregationState NullableDoubleState state, @AggregationState NullableDoubleState otherState) { // noop this is only for annotation testing puproses }
@InputFunction @TypeParameter("T") public static void input( @AggregationState NullableLongState state, @SqlType("array(T)") Block arrayBlock, @SqlType("T") long additionalValue) { // noop this is only for annotation testing puproses }