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

drill git commit: DRILL-2714: For SystemTable, Enforce Width only if the table is distributed (e.g., sys.memoy, sys.drillbits, sys.threads)

Repository: drill
Updated Branches:
  refs/heads/master f066786e4 -> cbfe5772d


DRILL-2714: For SystemTable, Enforce Width only if the table is distributed (e.g., sys.memoy, sys.drillbits, sys.threads)


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

Branch: refs/heads/master
Commit: cbfe5772d02b6bb36af9ffd6c8572d612b4a88d5
Parents: f066786
Author: Hsuan-Yi Chu <hs...@usc.edu>
Authored: Tue Apr 7 15:00:16 2015 -0700
Committer: Hsuan-Yi Chu <hs...@usc.edu>
Committed: Tue Apr 7 15:00:16 2015 -0700

----------------------------------------------------------------------
 .../org/apache/drill/exec/store/sys/SystemTableScan.java  |  4 ++--
 .../src/test/java/org/apache/drill/TestStarQueries.java   | 10 +++++++++-
 2 files changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/cbfe5772/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTableScan.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTableScan.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTableScan.java
index ce029ce..f8baf97 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTableScan.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTableScan.java
@@ -98,10 +98,10 @@ public class SystemTableScan extends AbstractGroupScan implements SubScan {
     return table.isDistributed() ? plugin.getContext().getBits().size() : 1;
   }
 
-  // This enforces maximum parallelization width.
+  // This enforces maximum parallelization width for distributed tables
   @Override
   public boolean enforceWidth() {
-    return true;
+    return table.isDistributed();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/drill/blob/cbfe5772/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java b/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java
index 5447fa6..89cc496 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java
@@ -246,7 +246,15 @@ public class TestStarQueries extends BaseTestQuery{
 
   @Test  // Join a select star of SchemaTable, with a select star of Schema-less table.
   public void testSelStarJoinSchemaWithSchemaLess() throws Exception {
-    test("select t1.name, t1.kind, t2.n_nationkey from (select * from sys.options) t1 join (select * from cp.`tpch/nation.parquet`) t2 on t1.name = t2.n_name;");
+    String query = "select t1.name, t1.kind, t2.n_nationkey from " +
+        "(select * from sys.options) t1 " +
+        "join (select * from cp.`tpch/nation.parquet`) t2 " +
+        "on t1.name = t2.n_name";
+
+    test("alter session set `planner.enable_broadcast_join` = false");
+    test(query);
+    test("alter session set `planner.enable_broadcast_join` = true");
+    test(query);
   }
 
   @Test // see DRILL-1811