jcamachor commented on a change in pull request #1909: [CALCITE-3914] Improve 
SubsitutionVisitor to consider RexCall of type PLUS and TIMES for 
canonicalization (Vineet Garg)
URL: https://github.com/apache/calcite/pull/1909#discussion_r406977531
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java
 ##########
 @@ -324,6 +324,8 @@ public static RexNode splitFilter(final RexSimplify 
simplify,
    */
   private static RexNode canonizeNode(RexBuilder rexBuilder, RexNode 
condition) {
     switch (condition.getKind()) {
+    case PLUS:
 
 Review comment:
   The code in this block removes duplicate operands (via the `TreeMap`). You 
will need slightly different code for `PLUS` or `TIMES` (just the sort piece).
   
   Once this is fixed, could you add a test with duplicate operand, e.g,., `x + 
x` ?

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