chunweilei commented on a change in pull request #1818: [CALCITE-3809] 
RexSimplify simplifies nondeterministic function incorrectly
URL: https://github.com/apache/calcite/pull/1818#discussion_r382881913
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rex/RexAnalyzer.java
 ##########
 @@ -128,6 +128,10 @@ public RexAnalyzer(RexNode e, RelOptPredicateList 
predicates) {
     }
 
     @Override public Void visitCall(RexCall call) {
+      if (!call.getOperator().isDeterministic()) {
+        ++unsupportedCount;
 
 Review comment:
   It might be better to put ```isSupported(RexCall)`` into  
```VariableCollector```  which is used to counts features (such as CAST) that  
```RexInterpreter``` cannot handle[1].
   
   [1] 
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/rex/RexAnalyzer.java#L105-L109.

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