vlsi commented on a change in pull request #2253:
URL: https://github.com/apache/calcite/pull/2253#discussion_r519644058



##########
File path: core/src/main/java/org/apache/calcite/rex/RexSimplify.java
##########
@@ -1688,6 +1690,108 @@ RexNode simplifyAnd2ForUnknownAsFalse(List<RexNode> 
terms,
       return e;
     }
   }
+  
+  public RexNode simplifyBoolean(RexNode call) {

Review comment:
       Common factors are eliminated by 
`org.apache.calcite.rex.RexUtil#flattenAnd` which is used in 
`org.apache.calcite.rex.RexUtil#composeConjunction(org.apache.calcite.rex.RexBuilder,
 java.lang.Iterable<? extends org.apache.calcite.rex.RexNode>, boolean)`.
   
   Please make it explicit which patterns you are going to optimize, and why it 
requires new code rather than fixing the existing methods.
   I see you've created CALCITE-4385, however, the issue description is blank, 
and the issue title is too generic: `Adding optimization to simplify the And/Or 
condition`.
   
   The issue title and description should make it clear for the reviewer on 
what is the nature of the change, and why is it needed.




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


Reply via email to