amaliujia commented on a change in pull request #1602: [CALCITE-3531] 
AggregateProjectPullUpConstantsRule should not remove …
URL: https://github.com/apache/calcite/pull/1602#discussion_r349743461
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rex/RexUtil.java
 ##########
 @@ -514,9 +514,13 @@ public Boolean visitDynamicParam(RexDynamicParam 
dynamicParam) {
     }
 
     public Boolean visitCall(RexCall call) {
-      // Constant if operator is deterministic and all operands are
-      // constant.
-      return call.getOperator().isDeterministic()
 
 Review comment:
   Based on this comment of `isDeterministic`, I am thinking the original idea 
of using `isDeterministic()` is still correct.
   
   Basically `current_timestamp` is not deterministic depends on the time to 
call it.
   
   Instead of changing here, I found that `current_timestamp`, `current_date`, 
etc. return `true` for  `isDeterministic()`. Should those functions be changed 
to return `fasle`?

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