drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [03/13] drill git commit: DRILL-1384: Part 2 - Unit test cases change.
Date Wed, 22 Apr 2015 06:10:06 GMT
DRILL-1384: Part 2 - Unit test cases change.

Change two JDBC test cases, since the results for query w/o ORDER BY are not semantically
deterministic.

Make sure TestHashJoinAdvanced uses HashJoin only. Modify expected results in TestProjectPushDown:
the order of pushed columns could be different.

Disable TPCH Q16, due to OPTIQ-373 plan change.

Disable one parquet writer in TestExample, since it need ensure the created file does not
exist on the file system.


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

Branch: refs/heads/master
Commit: 884ad2d7b566f1e82467584d718c56ebdb187c1e
Parents: 581f2e8
Author: Jinfeng Ni <jni@apache.org>
Authored: Wed Apr 8 10:18:58 2015 -0700
Committer: Jinfeng Ni <jni@apache.org>
Committed: Tue Apr 21 16:29:37 2015 -0700

----------------------------------------------------------------------
 .../test/java/org/apache/drill/TestExampleQueries.java |  1 +
 .../java/org/apache/drill/TestProjectPushDown.java     |  2 +-
 .../java/org/apache/drill/TestTpchDistributed.java     |  1 +
 .../org/apache/drill/TestTpchDistributedStreaming.java |  1 +
 .../test/java/org/apache/drill/TestTpchExplain.java    |  1 +
 .../test/java/org/apache/drill/TestTpchPlanning.java   |  1 +
 .../test/java/org/apache/drill/TestTpchSingleMode.java |  1 +
 .../src/test/java/org/apache/drill/TestUnionAll.java   |  1 +
 .../exec/physical/impl/join/TestHashJoinAdvanced.java  | 13 +++++++++++++
 .../java/org/apache/drill/jdbc/test/TestJdbcQuery.java |  8 ++++----
 10 files changed, 25 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/884ad2d7/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 ec1fb58..4a2b45d 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
@@ -694,6 +694,7 @@ public class TestExampleQueries extends BaseTestQuery{
   }
 
   @Test // DRILL-2311
+  @Ignore ("Move to TestParquetWriter. Have to ensure same file name does not exist on filesystem.")
   public void testCreateTableSameColumnNames() throws Exception {
     String creatTable = "CREATE TABLE CaseInsensitiveColumnNames as " +
         "select cast(r_regionkey as BIGINT) BIGINT_col, cast(r_regionkey as DECIMAL) bigint_col
\n" +

http://git-wip-us.apache.org/repos/asf/drill/blob/884ad2d7/exec/java-exec/src/test/java/org/apache/drill/TestProjectPushDown.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestProjectPushDown.java b/exec/java-exec/src/test/java/org/apache/drill/TestProjectPushDown.java
index 34e57b3..60a6f49 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestProjectPushDown.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestProjectPushDown.java
@@ -198,7 +198,7 @@ public class TestProjectPushDown extends PlanTestBase {
     final String projection = "t0.fcolumns[0], t0.fmy.field, t0.freally.nested.field[0],
t1.scolumns[0], t1.smy.field, t1.sreally.nested.field[0], t2.tcolumns[0], t2.tmy.field, t2.treally.nested.field[0]";
     final String filter = "t0.fname = t1.sname and t1.slastname = t2.tlastname and t0.fcolumns[1]
+ t1.scolumns[1] = 100";
     final String firstExpected = "\"columns\" : [ \"`fname`\", \"`fcolumns`[0]\", \"`fmy`.`field`\",
\"`freally`.`nested`.`field`[0]\", \"`fcolumns`[1]\" ],";
-    final String secondExpected = "\"columns\" : [ \"`sname`\", \"`slastname`\", \"`scolumns`[0]\",
\"`smy`.`field`\", \"`sreally`.`nested`.`field`[0]\", \"`scolumns`[1]\" ],";
+    final String secondExpected = "\"columns\" : [ \"`sname`\", \"`slastname`\", \"`scolumns`[0]\",
\"`smy`.`field`\", \"`sreally`.`nested`.`field`[0]\", \"`scolumns`[1]\" ]";
     final String thirdExpected = "\"columns\" : [ \"`tlastname`\", \"`tcolumns`[0]\", \"`tmy`.`field`\",
\"`treally`.`nested`.`field`[0]\" ],";
 
     for (String table: TABLES) {

http://git-wip-us.apache.org/repos/asf/drill/blob/884ad2d7/exec/java-exec/src/test/java/org/apache/drill/TestTpchDistributed.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestTpchDistributed.java b/exec/java-exec/src/test/java/org/apache/drill/TestTpchDistributed.java
index b062b39..2b41912 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestTpchDistributed.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestTpchDistributed.java
@@ -107,6 +107,7 @@ public class TestTpchDistributed extends BaseTestQuery {
   }
 
   @Test
+  @Ignore // invalid plan, due to Nulls value NOT IN sub-q
   public void tpch16() throws Exception{
     testDistributed("queries/tpch/16.sql");
   }

http://git-wip-us.apache.org/repos/asf/drill/blob/884ad2d7/exec/java-exec/src/test/java/org/apache/drill/TestTpchDistributedStreaming.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestTpchDistributedStreaming.java
b/exec/java-exec/src/test/java/org/apache/drill/TestTpchDistributedStreaming.java
index 4a8d7c9..94433f4 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestTpchDistributedStreaming.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestTpchDistributedStreaming.java
@@ -108,6 +108,7 @@ public class TestTpchDistributedStreaming extends BaseTestQuery{
   }
 
   @Test
+  @Ignore // invalid plan, due to Nulls value NOT IN sub-q
   public void tpch16() throws Exception{
     testDistributed("queries/tpch/16.sql");
   }

http://git-wip-us.apache.org/repos/asf/drill/blob/884ad2d7/exec/java-exec/src/test/java/org/apache/drill/TestTpchExplain.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestTpchExplain.java b/exec/java-exec/src/test/java/org/apache/drill/TestTpchExplain.java
index 1d67a3a..b5e33f3 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestTpchExplain.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestTpchExplain.java
@@ -111,6 +111,7 @@ public class TestTpchExplain extends BaseTestQuery{
   }
 
   @Test
+  @Ignore // invalid plan, due to Nulls value NOT IN sub-q
   public void tpch16() throws Exception{
     doExplain("queries/tpch/16.sql");
   }

http://git-wip-us.apache.org/repos/asf/drill/blob/884ad2d7/exec/java-exec/src/test/java/org/apache/drill/TestTpchPlanning.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestTpchPlanning.java b/exec/java-exec/src/test/java/org/apache/drill/TestTpchPlanning.java
index 79faf2b..707ea78 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestTpchPlanning.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestTpchPlanning.java
@@ -111,6 +111,7 @@ public class TestTpchPlanning extends PlanningBase{
   }
 
   @Test
+  @Ignore // invalid plan, due to Nulls value NOT IN sub-q
   public void tpch16() throws Exception{
     testSqlPlanFromFile("queries/tpch/16.sql");
   }

http://git-wip-us.apache.org/repos/asf/drill/blob/884ad2d7/exec/java-exec/src/test/java/org/apache/drill/TestTpchSingleMode.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestTpchSingleMode.java b/exec/java-exec/src/test/java/org/apache/drill/TestTpchSingleMode.java
index 0098eb8..038efd1 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestTpchSingleMode.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestTpchSingleMode.java
@@ -111,6 +111,7 @@ public class TestTpchSingleMode extends BaseTestQuery{
   }
 
   @Test
+  @Ignore // invalid plan, due to Nulls value NOT IN sub-q
   public void tpch16() throws Exception{
     testSingleMode("queries/tpch/16.sql");
   }

http://git-wip-us.apache.org/repos/asf/drill/blob/884ad2d7/exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java b/exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java
index 7749a2a..72f52e9 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java
@@ -22,6 +22,7 @@ import org.apache.drill.common.types.TypeProtos;
 import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.work.foreman.SqlUnsupportedException;
 import org.apache.drill.exec.work.foreman.UnsupportedRelOperatorException;
+import org.junit.Ignore;
 import org.junit.Test;
 
 public class TestUnionAll extends BaseTestQuery{

http://git-wip-us.apache.org/repos/asf/drill/blob/884ad2d7/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestHashJoinAdvanced.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestHashJoinAdvanced.java
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestHashJoinAdvanced.java
index 796f6fe..fddb03b 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestHashJoinAdvanced.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestHashJoinAdvanced.java
@@ -20,10 +20,23 @@ package org.apache.drill.exec.physical.impl.join;
 
 
 import org.apache.drill.BaseTestQuery;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 
 public class TestHashJoinAdvanced extends BaseTestQuery {
 
+  // Have to disable merge join, if this testcase is to test "HASH-JOIN".
+  @BeforeClass
+  public static void disableMergeJoin() throws Exception {
+    test("alter session set `planner.enable_mergejoin` = false");
+  }
+
+  @AfterClass
+  public static void enableMergeJoin() throws Exception {
+    test("alter session set `planner.enable_mergejoin` = true");
+  }
 
   @Test //DRILL-2197 Left Self Join with complex type in projection
   public void testLeftSelfHashJoinWithMap() throws Exception {

http://git-wip-us.apache.org/repos/asf/drill/blob/884ad2d7/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java
index 09ad5db..843c1c7 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java
@@ -102,9 +102,9 @@ public class TestJdbcQuery extends JdbcTestQueryBase{
       .sql("SELECT TABLE_NAME, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS " +
         "WHERE TABLE_NAME NOT LIKE 'C%' AND COLUMN_NAME LIKE 'TABLE_%E'")
       .returns(
-        "TABLE_NAME=VIEWS; COLUMN_NAME=TABLE_NAME\n" +
         "TABLE_NAME=TABLES; COLUMN_NAME=TABLE_NAME\n" +
-        "TABLE_NAME=TABLES; COLUMN_NAME=TABLE_TYPE\n"
+        "TABLE_NAME=TABLES; COLUMN_NAME=TABLE_TYPE\n" +
+        "TABLE_NAME=VIEWS; COLUMN_NAME=TABLE_NAME\n"
       );
   }
 
@@ -114,8 +114,8 @@ public class TestJdbcQuery extends JdbcTestQueryBase{
       .sql("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.`TABLES` "+
         "WHERE TABLE_NAME SIMILAR TO '%(H|I)E%' AND TABLE_NAME NOT SIMILAR TO 'C%'")
       .returns(
-        "TABLE_NAME=VIEWS\n" +
-        "TABLE_NAME=SCHEMATA\n"
+        "TABLE_NAME=SCHEMATA\n" +
+        "TABLE_NAME=VIEWS\n"
       );
   }
 


Mime
View raw message