chunweilei commented on a change in pull request #1804: [CALCITE-3794] 
RexSimplify should return early if there is no pulled up predicate when 
simplifying using predicates
URL: https://github.com/apache/calcite/pull/1804#discussion_r379296736
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rex/RexSimplify.java
 ##########
 @@ -1978,7 +1980,7 @@ private static boolean canRollUp(TimeUnit outer, 
TimeUnit inner) {
       case MILLISECOND:
       case MICROSECOND:
         if (inner == TimeUnit.QUARTER) {
-          return outer == TimeUnit.YEAR || outer == TimeUnit.QUARTER;
+          return outer == TimeUnit.YEAR;
 
 Review comment:
   `outer == TimeUnit.QUARTER` is always false here.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to