From 7d437d570623f367f5dccff63c4e32d38b803604 Mon Sep 17 00:00:00 2001 From: HappenLee Date: Mon, 30 Jan 2023 09:58:27 +0800 Subject: [PATCH] [Bug](function) running_difference function coredump in regression test (#16215) --- be/src/vec/functions/function_running_difference.h | 4 ++-- .../trees/expressions/functions/scalar/RunningDifference.java | 2 +- gensrc/script/doris_builtins_functions.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) mode change 100755 => 100644 gensrc/script/doris_builtins_functions.py diff --git a/be/src/vec/functions/function_running_difference.h b/be/src/vec/functions/function_running_difference.h index 85f17ad786..cfdf77cda9 100644 --- a/be/src/vec/functions/function_running_difference.h +++ b/be/src/vec/functions/function_running_difference.h @@ -67,9 +67,9 @@ public: return_type = std::make_shared(); } else if (which.is_uint16() || which.is_int16()) { return_type = std::make_shared(); - } else if (which.is_uint32() || which.is_uint64() || which.is_int32()) { + } else if (which.is_uint32() || which.is_uint64() || which.is_int32() || which.is_int64()) { return_type = std::make_shared(); - } else if (which.is_int64() || which.is_int128()) { + } else if (which.is_int128()) { return_type = std::make_shared(); } else if (which.is_float32() || which.is_float64()) { return_type = std::make_shared(); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/RunningDifference.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/RunningDifference.java index 4d5bebfffd..9df72cfc7d 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/RunningDifference.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/RunningDifference.java @@ -54,7 +54,7 @@ public class RunningDifference extends ScalarFunction FunctionSignature.ret(SmallIntType.INSTANCE).args(TinyIntType.INSTANCE), FunctionSignature.ret(IntegerType.INSTANCE).args(SmallIntType.INSTANCE), FunctionSignature.ret(BigIntType.INSTANCE).args(IntegerType.INSTANCE), - FunctionSignature.ret(LargeIntType.INSTANCE).args(BigIntType.INSTANCE), + FunctionSignature.ret(BigIntType.INSTANCE).args(BigIntType.INSTANCE), FunctionSignature.ret(LargeIntType.INSTANCE).args(LargeIntType.INSTANCE), FunctionSignature.ret(DoubleType.INSTANCE).args(FloatType.INSTANCE), FunctionSignature.ret(DoubleType.INSTANCE).args(DoubleType.INSTANCE), diff --git a/gensrc/script/doris_builtins_functions.py b/gensrc/script/doris_builtins_functions.py old mode 100755 new mode 100644 index 7955622372..91ee009ccb --- a/gensrc/script/doris_builtins_functions.py +++ b/gensrc/script/doris_builtins_functions.py @@ -1236,7 +1236,7 @@ visible_functions = [ [['running_difference'], 'SMALLINT', ['TINYINT'], ''], [['running_difference'], 'INT', ['SMALLINT'], ''], [['running_difference'], 'BIGINT', ['INT'], ''], - [['running_difference'], 'LARGEINT', ['BIGINT'], ''], + [['running_difference'], 'BIGINT', ['BIGINT'], ''], [['running_difference'], 'LARGEINT', ['LARGEINT'], ''], [['running_difference'], 'DOUBLE', ['FLOAT'], ''], [['running_difference'], 'DOUBLE', ['DOUBLE'], ''],