[fix](nereids)fix some function signature issue (#25301)
1. remove wrong signature of nvl 2. the promoted type datetimev2 for datetime should be datetimev2(0)
This commit is contained in:
@ -62,8 +62,6 @@ public class Nvl extends ScalarFunction
|
||||
FunctionSignature.ret(FloatType.INSTANCE).args(FloatType.INSTANCE, FloatType.INSTANCE),
|
||||
FunctionSignature.ret(DateType.INSTANCE).args(DateType.INSTANCE, DateType.INSTANCE),
|
||||
FunctionSignature.ret(DateTimeType.INSTANCE).args(DateTimeType.INSTANCE, DateTimeType.INSTANCE),
|
||||
FunctionSignature.ret(DateTimeType.INSTANCE).args(DateType.INSTANCE, DateTimeType.INSTANCE),
|
||||
FunctionSignature.ret(DateTimeType.INSTANCE).args(DateTimeType.INSTANCE, DateType.INSTANCE),
|
||||
FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT)
|
||||
.args(DateTimeV2Type.SYSTEM_DEFAULT, DateTimeV2Type.SYSTEM_DEFAULT),
|
||||
FunctionSignature.ret(DateV2Type.INSTANCE)
|
||||
|
||||
@ -72,7 +72,8 @@ public class DateTimeV2Type extends DateLikeType {
|
||||
if (dataType instanceof DateTimeV2Type) {
|
||||
return (DateTimeV2Type) dataType;
|
||||
}
|
||||
if (dataType instanceof IntegralType || dataType instanceof BooleanType || dataType instanceof NullType) {
|
||||
if (dataType instanceof IntegralType || dataType instanceof BooleanType
|
||||
|| dataType instanceof NullType || dataType instanceof DateTimeType) {
|
||||
return SYSTEM_DEFAULT;
|
||||
}
|
||||
return MAX;
|
||||
|
||||
Reference in New Issue
Block a user