gparai commented on a change in pull request #1372: DRILL-6589: Push transitive 
closure predicates past aggregates/projects
URL: https://github.com/apache/drill/pull/1372#discussion_r205249991
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillFilterAggregateTransposeRule.java
 ##########
 @@ -24,20 +24,29 @@
 import org.apache.calcite.rel.core.Filter;
 import org.apache.calcite.rel.core.RelFactories;
 import org.apache.calcite.rel.rules.FilterAggregateTransposeRule;
+import org.apache.calcite.tools.RelBuilderFactory;
 import org.apache.drill.exec.planner.DrillRelBuilder;
 
 public class DrillFilterAggregateTransposeRule extends 
FilterAggregateTransposeRule{
 
   // Since Calcite's default FilterAggregateTransposeRule would match Filter 
on top of Aggregate, it potentially will match Rels with mixed CONVENTION trait.
-  // Here override match method, such that the rule matchs with Rel in the 
same CONVENTION.
+  // Here override match method, such that the rule matches with Rel in the 
same CONVENTION.
 
   public static final FilterAggregateTransposeRule INSTANCE = new 
DrillFilterAggregateTransposeRule();
 
+  public static final FilterAggregateTransposeRule DRILL_LOGICAL_INSTANCE = 
new DrillFilterAggregateTransposeRule(
+      DrillRelBuilder.proto(DrillRelFactories.DRILL_LOGICAL_FILTER_FACTORY, 
DrillRelFactories.DRILL_LOGICAL_AGGREGATE_FACTORY),
+      Filter.class, Aggregate.class);
+
   private DrillFilterAggregateTransposeRule() {
     super(Filter.class, 
DrillRelBuilder.proto(Contexts.of(RelFactories.DEFAULT_FILTER_FACTORY)),
         Aggregate.class);
   }
 
+  private DrillFilterAggregateTransposeRule(RelBuilderFactory 
relBuilderFactory,
 
 Review comment:
   Done

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to