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

 ##########
 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:
   `current_timestamp` is deterministic, or non-volatile. Because the value 
doesn't change within a transaction. Functions like random(), timeofday() are 
volatile, because the value can change in a single query, we need to reevaluate 
for every tuple.

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