[Bug](function) running_difference function coredump in regression test (#16215)

This commit is contained in:
HappenLee
2023-01-30 09:58:27 +08:00
committed by GitHub
parent 17885acd09
commit 7d437d5706
3 changed files with 4 additions and 4 deletions

View File

@ -67,9 +67,9 @@ public:
return_type = std::make_shared<DataTypeInt16>();
} else if (which.is_uint16() || which.is_int16()) {
return_type = std::make_shared<DataTypeInt32>();
} 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<DataTypeInt64>();
} else if (which.is_int64() || which.is_int128()) {
} else if (which.is_int128()) {
return_type = std::make_shared<DataTypeInt128>();
} else if (which.is_float32() || which.is_float64()) {
return_type = std::make_shared<DataTypeFloat64>();

View File

@ -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),

2
gensrc/script/doris_builtins_functions.py Executable file → Normal file
View File

@ -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'], ''],