You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ga...@apache.org on 2023/10/11 03:51:50 UTC

[doris] branch master updated: [Bug](delete) Use date as common type for date comparison (#25262)

This is an automated email from the ASF dual-hosted git repository.

gabriellee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 0d603dd4c35 [Bug](delete) Use date as common type for date comparison (#25262)
0d603dd4c35 is described below

commit 0d603dd4c35e59f33ea9db2b2842937655466c44
Author: Gabriel <ga...@gmail.com>
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 8c03b38b8de..9c73d84857c 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
@@ -404,6 +404,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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org