@LiteralParameters("x") @ScalarOperator(INDETERMINATE) @SqlType(StandardTypes.BOOLEAN) public static boolean indeterminate(@SqlType("char(x)") Slice value, @IsNull boolean isNull) { return isNull; } }
@Description("encodes the string to UTF-8") @ScalarFunction @LiteralParameters("x") @SqlType(StandardTypes.VARBINARY) public static Slice toUtf8(@SqlType("varchar(x)") Slice slice) { return slice; }
@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; } }
@Description("round up to nearest integer") @ScalarFunction(value = "ceiling", alias = "ceil") @SqlType(StandardTypes.TINYINT) public static long ceilingTinyint(@SqlType(StandardTypes.TINYINT) 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 }
@ScalarFunction("custom_is_null") @LiteralParameters("x") @SqlType(StandardTypes.BOOLEAN) public static boolean customIsNullVarchar(@SqlNullable @SqlType("varchar(x)") Slice slice) { return slice == null; }
@ScalarOperator(EQUAL) @SqlType(StandardTypes.BOOLEAN) @SqlNullable public static Boolean equal(@SqlType(StandardTypes.BIGINT) long left, @SqlType(StandardTypes.BIGINT) long right) { return left == right; }
@InputFunction public static void input( @AggregationState NullableDoubleState state, @BlockPosition @SqlType(DOUBLE) Block value, @BlockIndex int id) { // noop this is only for annotation testing puproses }
@Description("round up to nearest integer") @ScalarFunction(value = "ceiling", alias = "ceil") @SqlType(StandardTypes.INTEGER) public static long ceilingInteger(@SqlType(StandardTypes.INTEGER) long num) { return num; }
@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 }
@ScalarOperator(NOT_EQUAL) @SuppressWarnings("FloatingPointEquality") @SqlType(StandardTypes.BOOLEAN) @SqlNullable public static Boolean notEqual(@SqlType(StandardTypes.DOUBLE) double left, @SqlType(StandardTypes.DOUBLE) double right) { return left != right; }
@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; }
@InputFunction public static void input( @TypeParameter("ROW(ARRAY(BIGINT),ROW(ROW(CHAR)),BIGINT,MAP(BIGINT,CHAR))") Type type, @AggregationState NullableDoubleState state, @SqlType("double") double value) { // noop this is only for annotation testing puproses }
@Description("Euler's number") @ScalarFunction @SqlType(StandardTypes.DOUBLE) public static double e() { return Math.E; }
@InputFunction @TypeParameter("T1") @TypeParameter("T2") public static void input( @TypeParameter("ROW(ARRAY(T1),ROW(ROW(T2)),CHAR)") Type type, @AggregationState NullableDoubleState state, @SqlType("double") double value) { // noop this is only for annotation testing puproses }
@Description("remainder of given quotient") @ScalarFunction("mod") @SqlType(StandardTypes.INTEGER) public static long modInteger(@SqlType(StandardTypes.INTEGER) long num1, @SqlType(StandardTypes.INTEGER) long num2) { return num1 % num2; }
@InputFunction @TypeParameter("T") public static void input( @TypeParameter("T") Type type, @AggregationState NullableDoubleState state, @SqlType("T") double value) { // noop this is only for annotation testing puproses }
@Description("round to nearest integer") @ScalarFunction("round") @SqlType(StandardTypes.TINYINT) public static long roundTinyint(@SqlType(StandardTypes.TINYINT) long num) { return num; }
@InputFunction @TypeParameter("T") public static void input( @AggregationState NullableLongState state, @SqlType("array(T)") Block arrayBlock) { // noop this is only for annotation testing puproses }