drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amansi...@apache.org
Subject 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.
Date Tue, 28 Jul 2015 22:41:20 GMT
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 <asinha@maprtech.com>
Authored: Sat Jul 25 23:33:18 2015 -0700
Committer: Aman Sinha <asinha@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>


Mime
View raw message