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-850: Already fixed previously; added unit tests for multiple count distincts with hash agg and streaming agg (single and multiphase).
Date Wed, 07 Jan 2015 23:23:48 GMT
Repository: drill
Updated Branches:
  refs/heads/master 5cdd71986 -> 35a350fd3


DRILL-850: Already fixed previously; added unit tests for multiple count distincts with hash
agg and streaming agg (single and multiphase).


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

Branch: refs/heads/master
Commit: 35a350fd381d839b3a51587092779fd822a19734
Parents: 5cdd719
Author: Aman Sinha <asinha@maprtech.com>
Authored: Wed Jan 7 15:22:27 2015 -0800
Committer: Aman Sinha <asinha@maprtech.com>
Committed: Wed Jan 7 15:22:27 2015 -0800

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


http://git-wip-us.apache.org/repos/asf/drill/blob/35a350fd/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 41475fb..30be58a 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
@@ -472,4 +472,21 @@ public class TestExampleQueries extends BaseTestQuery{
 
   }
 
+  @Test
+  public void testMultipleCountDistinctWithGroupBy() throws Exception {
+    String query = "select n_regionkey, count(distinct n_nationkey), count(distinct n_name)
from cp.`tpch/nation.parquet` group by n_regionkey;";
+    String hashagg_only = "alter session set `planner.enable_hashagg` = true; " +
+                          "alter session set `planner.enable_streamagg` = false;";
+    String streamagg_only = "alter session set `planner.enable_hashagg` = false; " +
+                            "alter session set `planner.enable_streamagg` = true;";
+
+    // hash agg and streaming agg with default slice target (single phase aggregate)
+    test(hashagg_only + query);
+    test(streamagg_only + query);
+
+    // hash agg and streaming agg with lower slice target (multiphase aggregate)
+    test("alter session set `planner.slice_target` = 1; " + hashagg_only + query);
+    test("alter session set `planner.slice_target` = 1; " + streamagg_only + query);
+  }
+
 }


Mime
View raw message