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/04/28 20:18:54 UTC

drill git commit: DRILL-2479: Added test case for correlated EXISTS with IN subquery (fix is in Calcite).

Repository: drill
Updated Branches:
  refs/heads/master 57a96d200 -> 927d1998f


DRILL-2479: Added test case for correlated EXISTS with IN subquery (fix is in Calcite).


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

Branch: refs/heads/master
Commit: 927d1998f22bff1e142bb2eb9110d197f2da53fc
Parents: 57a96d2
Author: Aman Sinha <as...@maprtech.com>
Authored: Tue Apr 28 11:18:07 2015 -0700
Committer: Aman Sinha <as...@maprtech.com>
Committed: Tue Apr 28 11:18:07 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/drill/TestExampleQueries.java    | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/927d1998/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java b/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java
index 4a2b45d..138840f 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java
@@ -756,4 +756,19 @@ public class TestExampleQueries extends BaseTestQuery{
         .baselineValues((long) 3, (long) 6)
         .build().run();
   }
+
+  @Test // DRILL-2479
+  public void testCorrelatedExistsWithInSubq() throws Exception {
+    String query = "select count(*) as cnt from cp.`tpch/lineitem.parquet` l where exists "
+        + " (select ps.ps_suppkey from cp.`tpch/partsupp.parquet` ps where ps.ps_suppkey = l.l_suppkey and ps.ps_partkey "
+        + " in (select p.p_partkey from cp.`tpch/part.parquet` p where p.p_type like '%NICKEL'))";
+
+    testBuilder()
+    .sqlQuery(query)
+    .unOrdered()
+    .baselineColumns("cnt")
+    .baselineValues(60175l)
+    .go();
+  }
+
 }