You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by pa...@apache.org on 2015/04/07 04:15:03 UTC

[9/9] drill git commit: DRILL-2684: fix clashing view names

DRILL-2684: fix clashing view names


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

Branch: refs/heads/master
Commit: b2e9cd0e7d14231bb239c4c4cc99b2abc01d5e4e
Parents: e4e88cc
Author: Hanifi Gunes <hg...@maprtech.com>
Authored: Fri Apr 3 19:49:41 2015 -0700
Committer: Parth Chandra <pc...@maprtech.com>
Committed: Mon Apr 6 18:24:06 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/drill/TestExampleQueries.java   | 16 ++++++++--------
 .../test/java/org/apache/drill/TestUnionAll.java    | 12 ++++++------
 2 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/b2e9cd0e/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 862de5e..921dacc 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
@@ -390,24 +390,24 @@ public class TestExampleQueries extends BaseTestQuery{
   public void testDRILL_811ViewJoin() throws Exception {
     test("use dfs.tmp");
     test("create view nation_view_testexamplequeries as select * from cp.`tpch/nation.parquet`;");
-    test("create view region_view as select * from cp.`tpch/region.parquet`;");
+    test("create view region_view_testexamplequeries as select * from cp.`tpch/region.parquet`;");
 
-    test("select n.n_nationkey, n.n_regionkey, r.r_name from region_view r , nation_view_testexamplequeries n where r.r_regionkey = n.n_regionkey ");
+    test("select n.n_nationkey, n.n_regionkey, r.r_name from region_view_testexamplequeries r , nation_view_testexamplequeries n where r.r_regionkey = n.n_regionkey ");
 
-    test("select n.n_regionkey, count(*) as cnt from region_view r , nation_view_testexamplequeries n where r.r_regionkey = n.n_regionkey and n.n_nationkey > 8 group by n.n_regionkey order by n.n_regionkey");
+    test("select n.n_regionkey, count(*) as cnt from region_view_testexamplequeries r , nation_view_testexamplequeries n where r.r_regionkey = n.n_regionkey and n.n_nationkey > 8 group by n.n_regionkey order by n.n_regionkey");
 
-    test("select n.n_regionkey, count(*) as cnt from region_view r join nation_view_testexamplequeries n on r.r_regionkey = n.n_regionkey and n.n_nationkey > 8 group by n.n_regionkey order by n.n_regionkey");
+    test("select n.n_regionkey, count(*) as cnt from region_view_testexamplequeries r join nation_view_testexamplequeries n on r.r_regionkey = n.n_regionkey and n.n_nationkey > 8 group by n.n_regionkey order by n.n_regionkey");
 
-    test("drop view region_view ");
+    test("drop view region_view_testexamplequeries ");
     test("drop view nation_view_testexamplequeries ");
   }
 
   @Test  // DRILL-811
   public void testDRILL_811Json() throws Exception {
     test("use dfs.tmp");
-    test("create view region_view as select * from cp.`region.json`;");
-    test("select sales_city, sales_region from region_view where region_id > 50 order by sales_country; ");
-    test("drop view region_view ");
+    test("create view region_view_testexamplequeries as select * from cp.`region.json`;");
+    test("select sales_city, sales_region from region_view_testexamplequeries where region_id > 50 order by sales_country; ");
+    test("drop view region_view_testexamplequeries ");
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/drill/blob/b2e9cd0e/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 fee1d6a..7033013 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
@@ -186,11 +186,11 @@ public class TestUnionAll extends BaseTestQuery{
   public void testUnionAllViewExpandableStar() throws Exception {
     test("use dfs.tmp");
     test("create view nation_view_testunionall as select n_name, n_nationkey from cp.`tpch/nation.parquet`;");
-    test("create view region_view as select r_name, r_regionkey from cp.`tpch/region.parquet`;");
+    test("create view region_view_testunionall as select r_name, r_regionkey from cp.`tpch/region.parquet`;");
 
     String query1 = "(select * from dfs.tmp.`nation_view_testunionall`) " +
                     "union all " +
-                    "(select * from dfs.tmp.`region_view`) ";
+                    "(select * from dfs.tmp.`region_view_testunionall`) ";
 
     String query2 =  "(select r_name, r_regionkey from cp.`tpch/region.parquet`) " +
                      "union all " +
@@ -214,7 +214,7 @@ public class TestUnionAll extends BaseTestQuery{
           .build().run();
     } finally {
       test("drop view nation_view_testunionall");
-      test("drop view region_view");
+      test("drop view region_view_testunionall");
     }
   }
 
@@ -239,12 +239,12 @@ public class TestUnionAll extends BaseTestQuery{
   public void testDiffDataTypesAndModes() throws Exception {
     test("use dfs.tmp");
     test("create view nation_view_testunionall as select n_name, n_nationkey from cp.`tpch/nation.parquet`;");
-    test("create view region_view as select r_name, r_regionkey from cp.`tpch/region.parquet`;");
+    test("create view region_view_testunionall as select r_name, r_regionkey from cp.`tpch/region.parquet`;");
 
     String t1 = "(select n_comment, n_regionkey from cp.`tpch/nation.parquet` limit 5)";
     String t2 = "(select * from nation_view_testunionall  limit 5)";
     String t3 = "(select full_name, store_id from cp.`employee.json` limit 5)";
-    String t4 = "(select * from region_view  limit 5)";
+    String t4 = "(select * from region_view_testunionall  limit 5)";
 
     String query1 = t1 + " union all " + t2 + " union all " + t3 + " union all " + t4;
 
@@ -258,7 +258,7 @@ public class TestUnionAll extends BaseTestQuery{
           .build().run();
     } finally {
       test("drop view nation_view_testunionall");
-      test("drop view region_view");
+      test("drop view region_view_testunionall");
     }
   }