littleeleventhwolf commented on a change in pull request #7183:
URL: https://github.com/apache/incubator-doris/pull/7183#discussion_r757040757



##########
File path: fe/fe-core/src/main/java/org/apache/doris/analysis/DateLiteral.java
##########
@@ -361,8 +368,18 @@ public int compareLiteral(LiteralExpr expr) {
         if (expr == MaxLiteral.MAX_VALUE) {
             return -1;
         }
+
+        long thisExprLongValue = getLongValue();
+        long otherExprLongValue = expr.getLongValue();
+        if (!getType().equals(expr.getType())) {
+            if (getType().equals(Type.DATE)) {

Review comment:
       Thank you for reminding.
   `Expr` could be other type besides `DATE` and `DATETIME`. I find the 
constructor or `init` method separately carry out `DATE` type. Other types are 
treated as `DATETIME` indeed, even though the assigned type is not `DATETIME`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to