diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/GetJsonBigInt.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/GetJsonBigInt.java index f788d4506f..0160c11c89 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/GetJsonBigInt.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/GetJsonBigInt.java @@ -23,7 +23,7 @@ import org.apache.doris.nereids.trees.expressions.functions.AlwaysNullable; import org.apache.doris.nereids.trees.expressions.functions.ExplicitlyCastableSignature; import org.apache.doris.nereids.trees.expressions.shape.BinaryExpression; import org.apache.doris.nereids.trees.expressions.visitor.ExpressionVisitor; -import org.apache.doris.nereids.types.IntegerType; +import org.apache.doris.nereids.types.BigIntType; import org.apache.doris.nereids.types.StringType; import org.apache.doris.nereids.types.VarcharType; @@ -39,8 +39,8 @@ public class GetJsonBigInt extends ScalarFunction implements BinaryExpression, ExplicitlyCastableSignature, AlwaysNullable { public static final List SIGNATURES = ImmutableList.of( - FunctionSignature.ret(IntegerType.INSTANCE).args(VarcharType.SYSTEM_DEFAULT, VarcharType.SYSTEM_DEFAULT), - FunctionSignature.ret(IntegerType.INSTANCE).args(StringType.INSTANCE, StringType.INSTANCE) + FunctionSignature.ret(BigIntType.INSTANCE).args(VarcharType.SYSTEM_DEFAULT, VarcharType.SYSTEM_DEFAULT), + FunctionSignature.ret(BigIntType.INSTANCE).args(StringType.INSTANCE, StringType.INSTANCE) ); /** diff --git a/regression-test/data/nereids_function_p0/scalar_function/G.out b/regression-test/data/nereids_function_p0/scalar_function/G.out index a300965516..a37b709746 100644 --- a/regression-test/data/nereids_function_p0/scalar_function/G.out +++ b/regression-test/data/nereids_function_p0/scalar_function/G.out @@ -1,4 +1,7 @@ -- This file is automatically generated. You should know what you did if you want to edit this +-- !sql_get_json_bigint_Varchar_Varchar -- +1678708107000 + -- !sql_greatest_TinyInt -- \N 1 diff --git a/regression-test/suites/nereids_function_p0/scalar_function/G.groovy b/regression-test/suites/nereids_function_p0/scalar_function/G.groovy index a4e40806d3..98a5e8bb4f 100644 --- a/regression-test/suites/nereids_function_p0/scalar_function/G.groovy +++ b/regression-test/suites/nereids_function_p0/scalar_function/G.groovy @@ -16,35 +16,36 @@ // under the License. suite("nereids_scalar_fn_G") { - sql 'use regression_test_nereids_function_p0' - sql 'set enable_nereids_planner=true' - sql 'set enable_fallback_to_original_planner=false' - qt_sql_greatest_TinyInt "select greatest(ktint) from fn_test order by ktint" - qt_sql_greatest_TinyInt_notnull "select greatest(ktint) from fn_test_not_nullable order by ktint" - qt_sql_greatest_SmallInt "select greatest(ksint) from fn_test order by ksint" - qt_sql_greatest_SmallInt_notnull "select greatest(ksint) from fn_test_not_nullable order by ksint" - qt_sql_greatest_Integer "select greatest(kint) from fn_test order by kint" - qt_sql_greatest_Integer_notnull "select greatest(kint) from fn_test_not_nullable order by kint" - qt_sql_greatest_BigInt "select greatest(kbint) from fn_test order by kbint" - qt_sql_greatest_BigInt_notnull "select greatest(kbint) from fn_test_not_nullable order by kbint" - qt_sql_greatest_LargeInt "select greatest(klint) from fn_test order by klint" - qt_sql_greatest_LargeInt_notnull "select greatest(klint) from fn_test_not_nullable order by klint" - qt_sql_greatest_Float "select greatest(kfloat) from fn_test order by kfloat" - qt_sql_greatest_Float_notnull "select greatest(kfloat) from fn_test_not_nullable order by kfloat" - qt_sql_greatest_Double "select greatest(kdbl) from fn_test order by kdbl" - qt_sql_greatest_Double_notnull "select greatest(kdbl) from fn_test_not_nullable order by kdbl" - qt_sql_greatest_DecimalV2 "select greatest(kdcmls1) from fn_test order by kdcmls1" - qt_sql_greatest_DecimalV2_notnull "select greatest(kdcmls1) from fn_test_not_nullable order by kdcmls1" - qt_sql_greatest_Date "select greatest(kdt) from fn_test order by kdt" - qt_sql_greatest_Date_notnull "select greatest(kdt) from fn_test_not_nullable order by kdt" - qt_sql_greatest_DateV2 "select greatest(kdtv2) from fn_test order by kdtv2" - qt_sql_greatest_DateV2_notnull "select greatest(kdtv2) from fn_test_not_nullable order by kdtv2" - qt_sql_greatest_DateTime "select greatest(kdtm) from fn_test order by kdtm" - qt_sql_greatest_DateTime_notnull "select greatest(kdtm) from fn_test_not_nullable order by kdtm" - qt_sql_greatest_DateTimeV2 "select greatest(kdtmv2s1) from fn_test order by kdtmv2s1" - qt_sql_greatest_DateTimeV2_notnull "select greatest(kdtmv2s1) from fn_test_not_nullable order by kdtmv2s1" - qt_sql_greatest_Varchar "select greatest(kvchrs1) from fn_test order by kvchrs1" - qt_sql_greatest_Varchar_notnull "select greatest(kvchrs1) from fn_test_not_nullable order by kvchrs1" - qt_sql_greatest_String "select greatest(kstr) from fn_test order by kstr" - qt_sql_greatest_String_notnull "select greatest(kstr) from fn_test_not_nullable order by kstr" -} \ No newline at end of file + sql 'use regression_test_nereids_function_p0' + sql 'set enable_nereids_planner=true' + sql 'set enable_fallback_to_original_planner=false' + qt_sql_get_json_bigint_Varchar_Varchar """SELECT get_json_bigint('{"k1":1678708107000, "k2":"2"}', "\$.k1")""" + qt_sql_greatest_TinyInt "select greatest(ktint) from fn_test order by ktint" + qt_sql_greatest_TinyInt_notnull "select greatest(ktint) from fn_test_not_nullable order by ktint" + qt_sql_greatest_SmallInt "select greatest(ksint) from fn_test order by ksint" + qt_sql_greatest_SmallInt_notnull "select greatest(ksint) from fn_test_not_nullable order by ksint" + qt_sql_greatest_Integer "select greatest(kint) from fn_test order by kint" + qt_sql_greatest_Integer_notnull "select greatest(kint) from fn_test_not_nullable order by kint" + qt_sql_greatest_BigInt "select greatest(kbint) from fn_test order by kbint" + qt_sql_greatest_BigInt_notnull "select greatest(kbint) from fn_test_not_nullable order by kbint" + qt_sql_greatest_LargeInt "select greatest(klint) from fn_test order by klint" + qt_sql_greatest_LargeInt_notnull "select greatest(klint) from fn_test_not_nullable order by klint" + qt_sql_greatest_Float "select greatest(kfloat) from fn_test order by kfloat" + qt_sql_greatest_Float_notnull "select greatest(kfloat) from fn_test_not_nullable order by kfloat" + qt_sql_greatest_Double "select greatest(kdbl) from fn_test order by kdbl" + qt_sql_greatest_Double_notnull "select greatest(kdbl) from fn_test_not_nullable order by kdbl" + qt_sql_greatest_DecimalV2 "select greatest(kdcmls1) from fn_test order by kdcmls1" + qt_sql_greatest_DecimalV2_notnull "select greatest(kdcmls1) from fn_test_not_nullable order by kdcmls1" + qt_sql_greatest_Date "select greatest(kdt) from fn_test order by kdt" + qt_sql_greatest_Date_notnull "select greatest(kdt) from fn_test_not_nullable order by kdt" + qt_sql_greatest_DateV2 "select greatest(kdtv2) from fn_test order by kdtv2" + qt_sql_greatest_DateV2_notnull "select greatest(kdtv2) from fn_test_not_nullable order by kdtv2" + qt_sql_greatest_DateTime "select greatest(kdtm) from fn_test order by kdtm" + qt_sql_greatest_DateTime_notnull "select greatest(kdtm) from fn_test_not_nullable order by kdtm" + qt_sql_greatest_DateTimeV2 "select greatest(kdtmv2s1) from fn_test order by kdtmv2s1" + qt_sql_greatest_DateTimeV2_notnull "select greatest(kdtmv2s1) from fn_test_not_nullable order by kdtmv2s1" + qt_sql_greatest_Varchar "select greatest(kvchrs1) from fn_test order by kvchrs1" + qt_sql_greatest_Varchar_notnull "select greatest(kvchrs1) from fn_test_not_nullable order by kvchrs1" + qt_sql_greatest_String "select greatest(kstr) from fn_test order by kstr" + qt_sql_greatest_String_notnull "select greatest(kstr) from fn_test_not_nullable order by kstr" +}