rubenada commented on a change in pull request #1309: [CALCITE-3183] Trimming 
method for Filter rel uses wrong traitSet
URL: https://github.com/apache/calcite/pull/1309#discussion_r301435477
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/core/RelFactories.java
 ##########
 @@ -303,6 +303,10 @@ public RelNode createAggregate(RelNode input,
   public interface FilterFactory {
     /** Creates a filter. */
     RelNode createFilter(RelNode input, RexNode condition);
+
+    /** Creates a filter. */
+    RelNode createFilter(RelNode input, RexNode condition,
 
 Review comment:
   I'm not sure if this is "public API" or not, but if it is, this will be a 
"breaking change". Should it be documented somewhere? Another alternative could 
be providing a default implementation for the new method (which just ignores 
the CorrelationId set):
   ```
   default RelNode createFilter(RelNode input, RexNode condition,
                                ImmutableSet<CorrelationId> variablesSet) {
     return createFilter(input, condition);
   }
   ```
   This approach will not break any existing implementation of `FilterFactory`, 
e.g. this patch would not need to modify `PigRelFactories.java`.
   I'm not against the current solution, but I thought it might be worth it to 
discuss this other alternative.

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