You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/12/01 03:38:20 UTC

[GitHub] [incubator-doris] littleeleventhwolf commented on a change in pull request #7183: [BUG] Fix `curdate()+0` to behave like mysql

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



##########
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:
       Could you please give me some advice on how to process other types reasonably?
   What I can think of now is to process `DATE` type separately, because the constructor or init-method or getLongValue-method only process `DATE` type separately too. And other types (e.g. LONG), the assigned type is not `DATEIME`, but in fact they are still processed as `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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org