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 d3f0a1856ece891e3ec0dfe8ee9e64f9692eb2cc
Author: Gabriel <[email protected]>
AuthorDate: Wed Oct 11 11:51:43 2023 +0800

    [Bug](delete) Use date as common type for date comparison (#25262)
---
 fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java
index f892b850bb5..bce4807357b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java
@@ -403,6 +403,8 @@ public class BinaryPredicate extends Predicate implements 
Writable {
             } else if (getChild(1).getType().isDate()
                     && (getChild(0).getType().isStringType() && getChild(0) 
instanceof StringLiteral)) {
                 return ((StringLiteral) 
getChild(0)).canConvertToDateType(Type.DATE) ? Type.DATE : Type.DATETIME;
+            } else if (getChild(1).getType().isDate() && 
getChild(0).getType().isDate()) {
+                return Type.DATE;
             } else {
                 return Type.DATETIME;
             }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to