You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by kx...@apache.org on 2023/10/12 14:53:31 UTC
[doris] 10/14: [fix](nereids)fix some function signature issue (#25301)
This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
commit 4e7420541ca33aee9a75660c0c64cdd33f67ea45
Author: starocean999 <40...@users.noreply.github.com>
AuthorDate: Thu Oct 12 14:23:20 2023 +0800
[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)
---
.../apache/doris/nereids/trees/expressions/functions/scalar/Nvl.java | 2 --
.../src/main/java/org/apache/doris/nereids/types/DateTimeV2Type.java | 3 ++-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/Nvl.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/Nvl.java
index 945feec9d2e..9b8e51d238d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/Nvl.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/Nvl.java
@@ -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)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/types/DateTimeV2Type.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/types/DateTimeV2Type.java
index 0b8f64316bd..12b8be5959a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/types/DateTimeV2Type.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/types/DateTimeV2Type.java
@@ -73,7 +73,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;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org