vlsi commented on a change in pull request #1053: [CALCITE-2852] 
Simplification: traverse calculations and unknown UDFs
URL: https://github.com/apache/calcite/pull/1053#discussion_r258122567
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rex/RexSimplify.java
 ##########
 @@ -284,8 +284,24 @@ RexNode simplify(RexNode e, RexUnknownAs unknownAs) {
     case NOT_EQUALS:
       return simplifyComparison((RexCall) e, unknownAs);
     default:
+      if (e.getClass() == RexCall.class) {
+        return simplifyGenericNode((RexCall) e);
 
 Review comment:
   Suppose there's a generic `f(x)`.
   Then `f(f(f(f(f(x)))))` would seem to have `O(N^2)` complexity as each time 
it would recurse all the way down.
   
   Any thoughts on that?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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