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

 ##########
 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:
   It depends on different database vendors. MySQL, Postgres mark it as 
deterministic, while SQL Server mark it as nondeterministic.
   
   
https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_current-timestamp
   
https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_now
   NOW() returns a constant time that indicates the time at which the statement 
began to execute. 

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