You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by am...@apache.org on 2015/07/29 00:41:20 UTC
drill git commit: DRILL-2949: Fix CannotPlanException for TPC-DS 1
and 30 (Fix is CALCITE-714) by pushing join condition into subquery when
de-correlating.
Repository: drill
Updated Branches:
refs/heads/master a219f8784 -> 83a9ebd93
DRILL-2949: Fix CannotPlanException for TPC-DS 1 and 30 (Fix is CALCITE-714) by pushing join condition into subquery when de-correlating.
Added unit test.
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/83a9ebd9
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/83a9ebd9
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/83a9ebd9
Branch: refs/heads/master
Commit: 83a9ebd937960883b65122959540e23882931cb2
Parents: a219f87
Author: Aman Sinha <as...@maprtech.com>
Authored: Sat Jul 25 23:33:18 2015 -0700
Committer: Aman Sinha <as...@maprtech.com>
Committed: Tue Jul 28 14:03:56 2015 -0700
----------------------------------------------------------------------
.../java/org/apache/drill/TestCorrelation.java | 17 +++++++++++++++++
pom.xml | 2 +-
2 files changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/83a9ebd9/exec/java-exec/src/test/java/org/apache/drill/TestCorrelation.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestCorrelation.java b/exec/java-exec/src/test/java/org/apache/drill/TestCorrelation.java
index 5ea97b1..ebfb4e8 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestCorrelation.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestCorrelation.java
@@ -37,4 +37,21 @@ public class TestCorrelation extends PlanTestBase {
.run();
}
+ @Test // DRILL-2949
+ public void testScalarAggAndFilterCorrelatedSubquery() throws Exception {
+ String query = "select count(*) as cnt from cp.`tpch/nation.parquet` n1, "
+ + " cp.`tpch/region.parquet` r1 where n1.n_regionkey = r1.r_regionkey and "
+ + " r1.r_regionkey < 3 and "
+ + " n1.n_nationkey > (select avg(n2.n_regionkey) * 4 from cp.`tpch/nation.parquet` n2 "
+ + " where n1.n_regionkey = n2.n_nationkey)";
+
+ testBuilder()
+ .sqlQuery(query)
+ .ordered()
+ .baselineColumns("cnt")
+ .baselineValues((long) 11)
+ .build()
+ .run();
+ }
+
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/83a9ebd9/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b661b93..3ec79e1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1226,7 +1226,7 @@
<dependency>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite-core</artifactId>
- <version>1.1.0-drill-r14</version>
+ <version>1.1.0-drill-r15</version>
<exclusions>
<exclusion>
<groupId>org.jgrapht</groupId>