drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject drill git commit: DRILL-2748: Add optimizer rule to push filter past aggregate.
Date Sat, 29 Aug 2015 13:43:03 GMT
Repository: drill
Updated Branches:
  refs/heads/master 445790fea -> 07dc46c11


DRILL-2748: Add optimizer rule to push filter past aggregate.


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/07dc46c1
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/07dc46c1
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/07dc46c1

Branch: refs/heads/master
Commit: 07dc46c112a8e9dde08471039fd81c6f6f4e1a54
Parents: 445790f
Author: Jinfeng Ni <jni@apache.org>
Authored: Thu Aug 27 14:54:28 2015 -0700
Committer: Jinfeng Ni <jni@apache.org>
Committed: Fri Aug 28 22:52:50 2015 -0700

----------------------------------------------------------------------
 .../org/apache/drill/exec/planner/logical/DrillRuleSets.java  | 2 ++
 .../src/test/java/org/apache/drill/TestPartitionFilter.java   | 7 +++++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/07dc46c1/exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillRuleSets.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillRuleSets.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillRuleSets.java
index 84fd343..3ad617a 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillRuleSets.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillRuleSets.java
@@ -23,6 +23,7 @@ import java.util.List;
 
 import org.apache.calcite.rel.rules.AggregateExpandDistinctAggregatesRule;
 import org.apache.calcite.rel.rules.AggregateRemoveRule;
+import org.apache.calcite.rel.rules.FilterAggregateTransposeRule;
 import org.apache.calcite.rel.rules.FilterSetOpTransposeRule;
 import org.apache.calcite.rel.rules.JoinPushExpressionsRule;
 import org.apache.calcite.rel.rules.JoinPushThroughJoinRule;
@@ -115,6 +116,7 @@ public class DrillRuleSets {
        */
       DrillPushFilterPastProjectRule.INSTANCE,
       FilterSetOpTransposeRule.INSTANCE,
+      FilterAggregateTransposeRule.INSTANCE,
 
       FilterMergeRule.INSTANCE,
       AggregateRemoveRule.INSTANCE,

http://git-wip-us.apache.org/repos/asf/drill/blob/07dc46c1/exec/java-exec/src/test/java/org/apache/drill/TestPartitionFilter.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestPartitionFilter.java b/exec/java-exec/src/test/java/org/apache/drill/TestPartitionFilter.java
index e1ebbc0..d99a346 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestPartitionFilter.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestPartitionFilter.java
@@ -289,4 +289,11 @@ public class TestPartitionFilter extends PlanTestBase {
     testExcludeFilter(query, 1, "Filter", 10);
   }
 
+  @Test // DRILL-2748
+  public void testPartitionFilterAfterPushFilterPastAgg() throws Exception {
+    String query = String.format("select dir0, dir1, cnt from (select dir0, dir1, count(*)
cnt from dfs_test.`%s/multilevel/parquet` group by dir0, dir1) where dir0 = '1994' and dir1
= 'Q1'", TEST_RES_PATH);
+    testExcludeFilter(query, 1, "Filter", 1);
+  }
+
+
 }
\ No newline at end of file


Mime
View raw message