@LiteralParameters("x") @ScalarOperator(INDETERMINATE) @SqlType(StandardTypes.BOOLEAN) public static boolean indeterminate(@SqlType("varchar(x)") Slice value, @IsNull boolean isNull) { return isNull; } }
@Description("round up to nearest integer") @ScalarFunction(alias = "ceil") @SqlType(StandardTypes.BIGINT) public static long ceiling(@SqlType(StandardTypes.BIGINT) long num) { return num; }
@ScalarOperator(EQUAL) @SqlType(StandardTypes.BOOLEAN) @SqlNullable public static Boolean equal(@SqlType(StandardTypes.BIGINT) long left, @SqlType(StandardTypes.BIGINT) long right) { return left == right; }
@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 }
@InputFunction public static void input( @AggregationState NullableDoubleState state, @BlockPosition @SqlType(DOUBLE) Block value, @BlockIndex int id) { // noop this is only for annotation testing puproses }
@ScalarFunction("custom_is_null") @LiteralParameters("x") @SqlType(StandardTypes.BOOLEAN) public static boolean customIsNullVarchar(@SqlNullable @SqlType("varchar(x)") Slice slice) { return slice == null; }
@ScalarFunction @SqlType(StandardTypes.BIGINT) public static long bad(@SqlType(StandardTypes.BIGINT) long value, @IsNull @SqlNullable boolean isNull) { return 0; } }
@AggregationFunction("multi_output_aggregate_1") @Description("Simple multi output function aggregate specialized description") @OutputFunction(DOUBLE) public static void output1( @AggregationState NullableDoubleState state, BlockBuilder out) { // noop this is only for annotation testing puproses }
@ScalarOperator(INDETERMINATE) @SqlType(StandardTypes.BOOLEAN) public static boolean indeterminate(@SqlType(StandardTypes.BIGINT) long value, @IsNull boolean isNull) { return isNull; } }
@OutputFunction(StandardTypes.HYPER_LOG_LOG) public static void evaluateFinal(@AggregationState HyperLogLogState state, BlockBuilder out) { SERIALIZER.serialize(state, out); } }
@Description("round down to nearest integer") @ScalarFunction("floor") @SqlType(StandardTypes.INTEGER) public static long floorInteger(@SqlType(StandardTypes.INTEGER) long num) { return num; }
@InputFunction @TypeParameter("T") public static void input( @AggregationState NullableLongState state, @SqlType("T") long value) { // noop this is only for annotation testing puproses }
@InputFunction public static void input( @AggregationState NullableDoubleState state, @BlockPosition @SqlType(DOUBLE) Block value, @BlockIndex int id) { // noop this is only for annotation testing puproses }
@LiteralParameters("x") @ScalarOperator(INDETERMINATE) @SqlType(StandardTypes.BOOLEAN) public static boolean indeterminate(@SqlType("char(x)") Slice value, @IsNull boolean isNull) { return isNull; } }
@Description("remainder of given quotient") @ScalarFunction @SqlType(StandardTypes.BIGINT) public static long mod(@SqlType(StandardTypes.BIGINT) long num1, @SqlType(StandardTypes.BIGINT) long num2) { return num1 % num2; }
@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 }
@Description("remainder of given quotient") @ScalarFunction @SqlType(StandardTypes.DOUBLE) public static double mod(@SqlType(StandardTypes.DOUBLE) double num1, @SqlType(StandardTypes.DOUBLE) double num2) { return num1 % num2; }
@InputFunction @TypeParameter("T") public static void input( @AggregationState NullableLongState state, @SqlType("array(T)") Block arrayBlock) { // noop this is only for annotation testing puproses }
@Description("round to nearest integer") @ScalarFunction("round") @SqlType(StandardTypes.SMALLINT) public static long roundSmallint(@SqlType(StandardTypes.SMALLINT) long num, @SqlType(StandardTypes.INTEGER) long decimals) { // TODO implement support for `decimals < 0` return num; }
@Description("round to nearest integer") @ScalarFunction @SqlType(StandardTypes.BIGINT) public static long round(@SqlType(StandardTypes.BIGINT) long num, @SqlType(StandardTypes.INTEGER) long decimals) { // TODO implement support for `decimals < 0` return num; }