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 04:25:12 UTC

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

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



##########
File path: fe/fe-core/src/main/java/org/apache/doris/qe/cache/PartitionRange.java
##########
@@ -238,7 +238,11 @@ public long realValue() {
         }
 
         private Date getDateValue(LiteralExpr expr) {
-            value = expr.getLongValue() / 1000000;
+            if (expr.getType().equals(Type.DATE)) {
+                value = expr.getLongValue();
+            } else {
+                value = expr.getLongValue() / DateLiteral.BASIC_ZERO_TIME;

Review comment:
       You already handle the type in `DateLiteral.getLongValue()`, why divide `BASIC_ZERO_TIME` here again?




-- 
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