Repository: hive
Updated Branches:
  refs/heads/master 10cfba200 -> b42fdc20d


HIVE-21018: Grouping/distinct on more than 64 columns should be possible 
(Zoltan Haindrich reviewed by Jesus Camacho Rodriguez)

Signed-off-by: Zoltan Haindrich <[email protected]>


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

Branch: refs/heads/master
Commit: b42fdc20d0b40dab9d7bd65aee609941ac28839f
Parents: 10cfba2
Author: Zoltan Haindrich <[email protected]>
Authored: Mon Dec 10 16:12:00 2018 +0100
Committer: Zoltan Haindrich <[email protected]>
Committed: Mon Dec 10 16:12:00 2018 +0100

----------------------------------------------------------------------
 .../test/resources/testconfiguration.properties |   1 +
 .../hadoop/hive/ql/parse/SemanticAnalyzer.java  |   8 +-
 .../test/queries/clientpositive/distinct_66.q   |  74 +++++
 .../results/clientpositive/distinct_66.q.out    | 301 +++++++++++++++++++
 .../clientpositive/llap/distinct_66.q.out       | 301 +++++++++++++++++++
 5 files changed, 681 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/b42fdc20/itests/src/test/resources/testconfiguration.properties
----------------------------------------------------------------------
diff --git a/itests/src/test/resources/testconfiguration.properties 
b/itests/src/test/resources/testconfiguration.properties
index f89b7ef..01cad2a 100644
--- a/itests/src/test/resources/testconfiguration.properties
+++ b/itests/src/test/resources/testconfiguration.properties
@@ -136,6 +136,7 @@ minillaplocal.shared.query.files=alter_merge_2_orc.q,\
   dynpart_sort_opt_vectorization.q,\
   dynpart_sort_optimization.q,\
   dynpart_sort_optimization2.q,\
+  distinct_66.q,\
   empty_array.q,\
   empty_join.q,\
   enforce_order.q,\

http://git-wip-us.apache.org/repos/asf/hive/blob/b42fdc20/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 
b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
index 04e9552..b330d71 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
@@ -41,7 +41,6 @@ import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
 import java.util.TreeSet;
-import java.util.function.Supplier;
 import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
 import java.util.stream.Collectors;
@@ -4124,9 +4123,6 @@ public class SemanticAnalyzer extends 
BaseSemanticAnalyzer {
     QBParseInfo parseInfo, String dest) throws SemanticException {
     List<Long> groupingSets = new ArrayList<Long>();
     List<ASTNode> groupByExprs = getGroupByForClause(parseInfo, dest);
-    if (groupByExprs.size() > Long.SIZE) {
-      throw new 
SemanticException(ErrorMsg.HIVE_GROUPING_SETS_SIZE_LIMIT.getMsg());
-    }
 
     if (parseInfo.getDestRollups().contains(dest)) {
       groupingSets = getGroupingSetsForRollup(groupByExprs.size());
@@ -4136,6 +4132,10 @@ public class SemanticAnalyzer extends 
BaseSemanticAnalyzer {
       groupingSets = getGroupingSets(groupByExprs, parseInfo, dest);
     }
 
+    if (!groupingSets.isEmpty() && groupByExprs.size() > Long.SIZE) {
+      throw new 
SemanticException(ErrorMsg.HIVE_GROUPING_SETS_SIZE_LIMIT.getMsg());
+    }
+
     return new ObjectPair<List<ASTNode>, List<Long>>(groupByExprs, 
groupingSets);
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/b42fdc20/ql/src/test/queries/clientpositive/distinct_66.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/distinct_66.q 
b/ql/src/test/queries/clientpositive/distinct_66.q
new file mode 100644
index 0000000..cb64eca
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/distinct_66.q
@@ -0,0 +1,74 @@
+CREATE TABLE widetable (
+c1 int,
+c2 int,
+c3 int,
+c4 int,
+c5 int,
+c6 int,
+c7 int,
+c8 int,
+c9 int,
+c10 int,
+c11 int,
+c12 int,
+c13 int,
+c14 int,
+c15 int,
+c16 int,
+c17 int,
+c18 int,
+c19 int,
+c20 int,
+c21 int,
+c22 int,
+c23 int,
+c24 int,
+c25 int,
+c26 int,
+c27 int,
+c28 int,
+c29 int,
+c30 int,
+c31 int,
+c32 int,
+c33 int,
+c34 int,
+c35 int,
+c36 int,
+c37 int,
+c38 int,
+c39 int,
+c40 int,
+c41 int,
+c42 int,
+c43 int,
+c44 int,
+c45 int,
+c46 int,
+c47 int,
+c48 int,
+c49 int,
+c50 int,
+c51 int,
+c52 int,
+c53 int,
+c54 int,
+c55 int,
+c56 int,
+c57 int,
+c58 int,
+c59 int,
+c60 int,
+c61 int,
+c62 int,
+c63 int,
+c64 int,
+c65 int,
+c66 int
+);
+
+
+insert into widetable (c66) values (1),(1),(2);
+create table res0 as select distinct * from widetable;
+select 'expected 2',count(*) from res0;
+

http://git-wip-us.apache.org/repos/asf/hive/blob/b42fdc20/ql/src/test/results/clientpositive/distinct_66.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/distinct_66.q.out 
b/ql/src/test/results/clientpositive/distinct_66.q.out
new file mode 100644
index 0000000..a20141d
--- /dev/null
+++ b/ql/src/test/results/clientpositive/distinct_66.q.out
@@ -0,0 +1,301 @@
+PREHOOK: query: CREATE TABLE widetable (
+c1 int,
+c2 int,
+c3 int,
+c4 int,
+c5 int,
+c6 int,
+c7 int,
+c8 int,
+c9 int,
+c10 int,
+c11 int,
+c12 int,
+c13 int,
+c14 int,
+c15 int,
+c16 int,
+c17 int,
+c18 int,
+c19 int,
+c20 int,
+c21 int,
+c22 int,
+c23 int,
+c24 int,
+c25 int,
+c26 int,
+c27 int,
+c28 int,
+c29 int,
+c30 int,
+c31 int,
+c32 int,
+c33 int,
+c34 int,
+c35 int,
+c36 int,
+c37 int,
+c38 int,
+c39 int,
+c40 int,
+c41 int,
+c42 int,
+c43 int,
+c44 int,
+c45 int,
+c46 int,
+c47 int,
+c48 int,
+c49 int,
+c50 int,
+c51 int,
+c52 int,
+c53 int,
+c54 int,
+c55 int,
+c56 int,
+c57 int,
+c58 int,
+c59 int,
+c60 int,
+c61 int,
+c62 int,
+c63 int,
+c64 int,
+c65 int,
+c66 int
+)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@widetable
+POSTHOOK: query: CREATE TABLE widetable (
+c1 int,
+c2 int,
+c3 int,
+c4 int,
+c5 int,
+c6 int,
+c7 int,
+c8 int,
+c9 int,
+c10 int,
+c11 int,
+c12 int,
+c13 int,
+c14 int,
+c15 int,
+c16 int,
+c17 int,
+c18 int,
+c19 int,
+c20 int,
+c21 int,
+c22 int,
+c23 int,
+c24 int,
+c25 int,
+c26 int,
+c27 int,
+c28 int,
+c29 int,
+c30 int,
+c31 int,
+c32 int,
+c33 int,
+c34 int,
+c35 int,
+c36 int,
+c37 int,
+c38 int,
+c39 int,
+c40 int,
+c41 int,
+c42 int,
+c43 int,
+c44 int,
+c45 int,
+c46 int,
+c47 int,
+c48 int,
+c49 int,
+c50 int,
+c51 int,
+c52 int,
+c53 int,
+c54 int,
+c55 int,
+c56 int,
+c57 int,
+c58 int,
+c59 int,
+c60 int,
+c61 int,
+c62 int,
+c63 int,
+c64 int,
+c65 int,
+c66 int
+)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@widetable
+PREHOOK: query: insert into widetable (c66) values (1),(1),(2)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@widetable
+POSTHOOK: query: insert into widetable (c66) values (1),(1),(2)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@widetable
+POSTHOOK: Lineage: widetable.c1 SIMPLE []
+POSTHOOK: Lineage: widetable.c10 SIMPLE []
+POSTHOOK: Lineage: widetable.c11 SIMPLE []
+POSTHOOK: Lineage: widetable.c12 SIMPLE []
+POSTHOOK: Lineage: widetable.c13 SIMPLE []
+POSTHOOK: Lineage: widetable.c14 SIMPLE []
+POSTHOOK: Lineage: widetable.c15 SIMPLE []
+POSTHOOK: Lineage: widetable.c16 SIMPLE []
+POSTHOOK: Lineage: widetable.c17 SIMPLE []
+POSTHOOK: Lineage: widetable.c18 SIMPLE []
+POSTHOOK: Lineage: widetable.c19 SIMPLE []
+POSTHOOK: Lineage: widetable.c2 SIMPLE []
+POSTHOOK: Lineage: widetable.c20 SIMPLE []
+POSTHOOK: Lineage: widetable.c21 SIMPLE []
+POSTHOOK: Lineage: widetable.c22 SIMPLE []
+POSTHOOK: Lineage: widetable.c23 SIMPLE []
+POSTHOOK: Lineage: widetable.c24 SIMPLE []
+POSTHOOK: Lineage: widetable.c25 SIMPLE []
+POSTHOOK: Lineage: widetable.c26 SIMPLE []
+POSTHOOK: Lineage: widetable.c27 SIMPLE []
+POSTHOOK: Lineage: widetable.c28 SIMPLE []
+POSTHOOK: Lineage: widetable.c29 SIMPLE []
+POSTHOOK: Lineage: widetable.c3 SIMPLE []
+POSTHOOK: Lineage: widetable.c30 SIMPLE []
+POSTHOOK: Lineage: widetable.c31 SIMPLE []
+POSTHOOK: Lineage: widetable.c32 SIMPLE []
+POSTHOOK: Lineage: widetable.c33 SIMPLE []
+POSTHOOK: Lineage: widetable.c34 SIMPLE []
+POSTHOOK: Lineage: widetable.c35 SIMPLE []
+POSTHOOK: Lineage: widetable.c36 SIMPLE []
+POSTHOOK: Lineage: widetable.c37 SIMPLE []
+POSTHOOK: Lineage: widetable.c38 SIMPLE []
+POSTHOOK: Lineage: widetable.c39 SIMPLE []
+POSTHOOK: Lineage: widetable.c4 SIMPLE []
+POSTHOOK: Lineage: widetable.c40 SIMPLE []
+POSTHOOK: Lineage: widetable.c41 SIMPLE []
+POSTHOOK: Lineage: widetable.c42 SIMPLE []
+POSTHOOK: Lineage: widetable.c43 SIMPLE []
+POSTHOOK: Lineage: widetable.c44 SIMPLE []
+POSTHOOK: Lineage: widetable.c45 SIMPLE []
+POSTHOOK: Lineage: widetable.c46 SIMPLE []
+POSTHOOK: Lineage: widetable.c47 SIMPLE []
+POSTHOOK: Lineage: widetable.c48 SIMPLE []
+POSTHOOK: Lineage: widetable.c49 SIMPLE []
+POSTHOOK: Lineage: widetable.c5 SIMPLE []
+POSTHOOK: Lineage: widetable.c50 SIMPLE []
+POSTHOOK: Lineage: widetable.c51 SIMPLE []
+POSTHOOK: Lineage: widetable.c52 SIMPLE []
+POSTHOOK: Lineage: widetable.c53 SIMPLE []
+POSTHOOK: Lineage: widetable.c54 SIMPLE []
+POSTHOOK: Lineage: widetable.c55 SIMPLE []
+POSTHOOK: Lineage: widetable.c56 SIMPLE []
+POSTHOOK: Lineage: widetable.c57 SIMPLE []
+POSTHOOK: Lineage: widetable.c58 SIMPLE []
+POSTHOOK: Lineage: widetable.c59 SIMPLE []
+POSTHOOK: Lineage: widetable.c6 SIMPLE []
+POSTHOOK: Lineage: widetable.c60 SIMPLE []
+POSTHOOK: Lineage: widetable.c61 SIMPLE []
+POSTHOOK: Lineage: widetable.c62 SIMPLE []
+POSTHOOK: Lineage: widetable.c63 SIMPLE []
+POSTHOOK: Lineage: widetable.c64 SIMPLE []
+POSTHOOK: Lineage: widetable.c65 SIMPLE []
+POSTHOOK: Lineage: widetable.c66 SCRIPT []
+POSTHOOK: Lineage: widetable.c7 SIMPLE []
+POSTHOOK: Lineage: widetable.c8 SIMPLE []
+POSTHOOK: Lineage: widetable.c9 SIMPLE []
+PREHOOK: query: create table res0 as select distinct * from widetable
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@widetable
+PREHOOK: Output: database:default
+PREHOOK: Output: default@res0
+POSTHOOK: query: create table res0 as select distinct * from widetable
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@widetable
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@res0
+POSTHOOK: Lineage: res0.c1 SIMPLE [(widetable)widetable.FieldSchema(name:c1, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c10 SIMPLE [(widetable)widetable.FieldSchema(name:c10, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c11 SIMPLE [(widetable)widetable.FieldSchema(name:c11, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c12 SIMPLE [(widetable)widetable.FieldSchema(name:c12, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c13 SIMPLE [(widetable)widetable.FieldSchema(name:c13, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c14 SIMPLE [(widetable)widetable.FieldSchema(name:c14, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c15 SIMPLE [(widetable)widetable.FieldSchema(name:c15, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c16 SIMPLE [(widetable)widetable.FieldSchema(name:c16, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c17 SIMPLE [(widetable)widetable.FieldSchema(name:c17, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c18 SIMPLE [(widetable)widetable.FieldSchema(name:c18, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c19 SIMPLE [(widetable)widetable.FieldSchema(name:c19, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c2 SIMPLE [(widetable)widetable.FieldSchema(name:c2, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c20 SIMPLE [(widetable)widetable.FieldSchema(name:c20, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c21 SIMPLE [(widetable)widetable.FieldSchema(name:c21, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c22 SIMPLE [(widetable)widetable.FieldSchema(name:c22, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c23 SIMPLE [(widetable)widetable.FieldSchema(name:c23, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c24 SIMPLE [(widetable)widetable.FieldSchema(name:c24, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c25 SIMPLE [(widetable)widetable.FieldSchema(name:c25, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c26 SIMPLE [(widetable)widetable.FieldSchema(name:c26, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c27 SIMPLE [(widetable)widetable.FieldSchema(name:c27, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c28 SIMPLE [(widetable)widetable.FieldSchema(name:c28, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c29 SIMPLE [(widetable)widetable.FieldSchema(name:c29, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c3 SIMPLE [(widetable)widetable.FieldSchema(name:c3, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c30 SIMPLE [(widetable)widetable.FieldSchema(name:c30, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c31 SIMPLE [(widetable)widetable.FieldSchema(name:c31, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c32 SIMPLE [(widetable)widetable.FieldSchema(name:c32, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c33 SIMPLE [(widetable)widetable.FieldSchema(name:c33, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c34 SIMPLE [(widetable)widetable.FieldSchema(name:c34, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c35 SIMPLE [(widetable)widetable.FieldSchema(name:c35, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c36 SIMPLE [(widetable)widetable.FieldSchema(name:c36, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c37 SIMPLE [(widetable)widetable.FieldSchema(name:c37, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c38 SIMPLE [(widetable)widetable.FieldSchema(name:c38, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c39 SIMPLE [(widetable)widetable.FieldSchema(name:c39, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c4 SIMPLE [(widetable)widetable.FieldSchema(name:c4, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c40 SIMPLE [(widetable)widetable.FieldSchema(name:c40, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c41 SIMPLE [(widetable)widetable.FieldSchema(name:c41, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c42 SIMPLE [(widetable)widetable.FieldSchema(name:c42, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c43 SIMPLE [(widetable)widetable.FieldSchema(name:c43, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c44 SIMPLE [(widetable)widetable.FieldSchema(name:c44, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c45 SIMPLE [(widetable)widetable.FieldSchema(name:c45, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c46 SIMPLE [(widetable)widetable.FieldSchema(name:c46, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c47 SIMPLE [(widetable)widetable.FieldSchema(name:c47, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c48 SIMPLE [(widetable)widetable.FieldSchema(name:c48, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c49 SIMPLE [(widetable)widetable.FieldSchema(name:c49, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c5 SIMPLE [(widetable)widetable.FieldSchema(name:c5, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c50 SIMPLE [(widetable)widetable.FieldSchema(name:c50, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c51 SIMPLE [(widetable)widetable.FieldSchema(name:c51, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c52 SIMPLE [(widetable)widetable.FieldSchema(name:c52, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c53 SIMPLE [(widetable)widetable.FieldSchema(name:c53, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c54 SIMPLE [(widetable)widetable.FieldSchema(name:c54, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c55 SIMPLE [(widetable)widetable.FieldSchema(name:c55, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c56 SIMPLE [(widetable)widetable.FieldSchema(name:c56, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c57 SIMPLE [(widetable)widetable.FieldSchema(name:c57, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c58 SIMPLE [(widetable)widetable.FieldSchema(name:c58, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c59 SIMPLE [(widetable)widetable.FieldSchema(name:c59, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c6 SIMPLE [(widetable)widetable.FieldSchema(name:c6, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c60 SIMPLE [(widetable)widetable.FieldSchema(name:c60, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c61 SIMPLE [(widetable)widetable.FieldSchema(name:c61, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c62 SIMPLE [(widetable)widetable.FieldSchema(name:c62, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c63 SIMPLE [(widetable)widetable.FieldSchema(name:c63, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c64 SIMPLE [(widetable)widetable.FieldSchema(name:c64, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c65 SIMPLE [(widetable)widetable.FieldSchema(name:c65, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c66 SIMPLE [(widetable)widetable.FieldSchema(name:c66, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c7 SIMPLE [(widetable)widetable.FieldSchema(name:c7, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c8 SIMPLE [(widetable)widetable.FieldSchema(name:c8, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c9 SIMPLE [(widetable)widetable.FieldSchema(name:c9, 
type:int, comment:null), ]
+PREHOOK: query: select 'expected 2',count(*) from res0
+PREHOOK: type: QUERY
+PREHOOK: Input: default@res0
+#### A masked pattern was here ####
+POSTHOOK: query: select 'expected 2',count(*) from res0
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@res0
+#### A masked pattern was here ####
+expected 2     2

http://git-wip-us.apache.org/repos/asf/hive/blob/b42fdc20/ql/src/test/results/clientpositive/llap/distinct_66.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/distinct_66.q.out 
b/ql/src/test/results/clientpositive/llap/distinct_66.q.out
new file mode 100644
index 0000000..a20141d
--- /dev/null
+++ b/ql/src/test/results/clientpositive/llap/distinct_66.q.out
@@ -0,0 +1,301 @@
+PREHOOK: query: CREATE TABLE widetable (
+c1 int,
+c2 int,
+c3 int,
+c4 int,
+c5 int,
+c6 int,
+c7 int,
+c8 int,
+c9 int,
+c10 int,
+c11 int,
+c12 int,
+c13 int,
+c14 int,
+c15 int,
+c16 int,
+c17 int,
+c18 int,
+c19 int,
+c20 int,
+c21 int,
+c22 int,
+c23 int,
+c24 int,
+c25 int,
+c26 int,
+c27 int,
+c28 int,
+c29 int,
+c30 int,
+c31 int,
+c32 int,
+c33 int,
+c34 int,
+c35 int,
+c36 int,
+c37 int,
+c38 int,
+c39 int,
+c40 int,
+c41 int,
+c42 int,
+c43 int,
+c44 int,
+c45 int,
+c46 int,
+c47 int,
+c48 int,
+c49 int,
+c50 int,
+c51 int,
+c52 int,
+c53 int,
+c54 int,
+c55 int,
+c56 int,
+c57 int,
+c58 int,
+c59 int,
+c60 int,
+c61 int,
+c62 int,
+c63 int,
+c64 int,
+c65 int,
+c66 int
+)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@widetable
+POSTHOOK: query: CREATE TABLE widetable (
+c1 int,
+c2 int,
+c3 int,
+c4 int,
+c5 int,
+c6 int,
+c7 int,
+c8 int,
+c9 int,
+c10 int,
+c11 int,
+c12 int,
+c13 int,
+c14 int,
+c15 int,
+c16 int,
+c17 int,
+c18 int,
+c19 int,
+c20 int,
+c21 int,
+c22 int,
+c23 int,
+c24 int,
+c25 int,
+c26 int,
+c27 int,
+c28 int,
+c29 int,
+c30 int,
+c31 int,
+c32 int,
+c33 int,
+c34 int,
+c35 int,
+c36 int,
+c37 int,
+c38 int,
+c39 int,
+c40 int,
+c41 int,
+c42 int,
+c43 int,
+c44 int,
+c45 int,
+c46 int,
+c47 int,
+c48 int,
+c49 int,
+c50 int,
+c51 int,
+c52 int,
+c53 int,
+c54 int,
+c55 int,
+c56 int,
+c57 int,
+c58 int,
+c59 int,
+c60 int,
+c61 int,
+c62 int,
+c63 int,
+c64 int,
+c65 int,
+c66 int
+)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@widetable
+PREHOOK: query: insert into widetable (c66) values (1),(1),(2)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@widetable
+POSTHOOK: query: insert into widetable (c66) values (1),(1),(2)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@widetable
+POSTHOOK: Lineage: widetable.c1 SIMPLE []
+POSTHOOK: Lineage: widetable.c10 SIMPLE []
+POSTHOOK: Lineage: widetable.c11 SIMPLE []
+POSTHOOK: Lineage: widetable.c12 SIMPLE []
+POSTHOOK: Lineage: widetable.c13 SIMPLE []
+POSTHOOK: Lineage: widetable.c14 SIMPLE []
+POSTHOOK: Lineage: widetable.c15 SIMPLE []
+POSTHOOK: Lineage: widetable.c16 SIMPLE []
+POSTHOOK: Lineage: widetable.c17 SIMPLE []
+POSTHOOK: Lineage: widetable.c18 SIMPLE []
+POSTHOOK: Lineage: widetable.c19 SIMPLE []
+POSTHOOK: Lineage: widetable.c2 SIMPLE []
+POSTHOOK: Lineage: widetable.c20 SIMPLE []
+POSTHOOK: Lineage: widetable.c21 SIMPLE []
+POSTHOOK: Lineage: widetable.c22 SIMPLE []
+POSTHOOK: Lineage: widetable.c23 SIMPLE []
+POSTHOOK: Lineage: widetable.c24 SIMPLE []
+POSTHOOK: Lineage: widetable.c25 SIMPLE []
+POSTHOOK: Lineage: widetable.c26 SIMPLE []
+POSTHOOK: Lineage: widetable.c27 SIMPLE []
+POSTHOOK: Lineage: widetable.c28 SIMPLE []
+POSTHOOK: Lineage: widetable.c29 SIMPLE []
+POSTHOOK: Lineage: widetable.c3 SIMPLE []
+POSTHOOK: Lineage: widetable.c30 SIMPLE []
+POSTHOOK: Lineage: widetable.c31 SIMPLE []
+POSTHOOK: Lineage: widetable.c32 SIMPLE []
+POSTHOOK: Lineage: widetable.c33 SIMPLE []
+POSTHOOK: Lineage: widetable.c34 SIMPLE []
+POSTHOOK: Lineage: widetable.c35 SIMPLE []
+POSTHOOK: Lineage: widetable.c36 SIMPLE []
+POSTHOOK: Lineage: widetable.c37 SIMPLE []
+POSTHOOK: Lineage: widetable.c38 SIMPLE []
+POSTHOOK: Lineage: widetable.c39 SIMPLE []
+POSTHOOK: Lineage: widetable.c4 SIMPLE []
+POSTHOOK: Lineage: widetable.c40 SIMPLE []
+POSTHOOK: Lineage: widetable.c41 SIMPLE []
+POSTHOOK: Lineage: widetable.c42 SIMPLE []
+POSTHOOK: Lineage: widetable.c43 SIMPLE []
+POSTHOOK: Lineage: widetable.c44 SIMPLE []
+POSTHOOK: Lineage: widetable.c45 SIMPLE []
+POSTHOOK: Lineage: widetable.c46 SIMPLE []
+POSTHOOK: Lineage: widetable.c47 SIMPLE []
+POSTHOOK: Lineage: widetable.c48 SIMPLE []
+POSTHOOK: Lineage: widetable.c49 SIMPLE []
+POSTHOOK: Lineage: widetable.c5 SIMPLE []
+POSTHOOK: Lineage: widetable.c50 SIMPLE []
+POSTHOOK: Lineage: widetable.c51 SIMPLE []
+POSTHOOK: Lineage: widetable.c52 SIMPLE []
+POSTHOOK: Lineage: widetable.c53 SIMPLE []
+POSTHOOK: Lineage: widetable.c54 SIMPLE []
+POSTHOOK: Lineage: widetable.c55 SIMPLE []
+POSTHOOK: Lineage: widetable.c56 SIMPLE []
+POSTHOOK: Lineage: widetable.c57 SIMPLE []
+POSTHOOK: Lineage: widetable.c58 SIMPLE []
+POSTHOOK: Lineage: widetable.c59 SIMPLE []
+POSTHOOK: Lineage: widetable.c6 SIMPLE []
+POSTHOOK: Lineage: widetable.c60 SIMPLE []
+POSTHOOK: Lineage: widetable.c61 SIMPLE []
+POSTHOOK: Lineage: widetable.c62 SIMPLE []
+POSTHOOK: Lineage: widetable.c63 SIMPLE []
+POSTHOOK: Lineage: widetable.c64 SIMPLE []
+POSTHOOK: Lineage: widetable.c65 SIMPLE []
+POSTHOOK: Lineage: widetable.c66 SCRIPT []
+POSTHOOK: Lineage: widetable.c7 SIMPLE []
+POSTHOOK: Lineage: widetable.c8 SIMPLE []
+POSTHOOK: Lineage: widetable.c9 SIMPLE []
+PREHOOK: query: create table res0 as select distinct * from widetable
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@widetable
+PREHOOK: Output: database:default
+PREHOOK: Output: default@res0
+POSTHOOK: query: create table res0 as select distinct * from widetable
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@widetable
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@res0
+POSTHOOK: Lineage: res0.c1 SIMPLE [(widetable)widetable.FieldSchema(name:c1, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c10 SIMPLE [(widetable)widetable.FieldSchema(name:c10, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c11 SIMPLE [(widetable)widetable.FieldSchema(name:c11, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c12 SIMPLE [(widetable)widetable.FieldSchema(name:c12, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c13 SIMPLE [(widetable)widetable.FieldSchema(name:c13, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c14 SIMPLE [(widetable)widetable.FieldSchema(name:c14, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c15 SIMPLE [(widetable)widetable.FieldSchema(name:c15, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c16 SIMPLE [(widetable)widetable.FieldSchema(name:c16, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c17 SIMPLE [(widetable)widetable.FieldSchema(name:c17, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c18 SIMPLE [(widetable)widetable.FieldSchema(name:c18, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c19 SIMPLE [(widetable)widetable.FieldSchema(name:c19, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c2 SIMPLE [(widetable)widetable.FieldSchema(name:c2, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c20 SIMPLE [(widetable)widetable.FieldSchema(name:c20, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c21 SIMPLE [(widetable)widetable.FieldSchema(name:c21, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c22 SIMPLE [(widetable)widetable.FieldSchema(name:c22, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c23 SIMPLE [(widetable)widetable.FieldSchema(name:c23, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c24 SIMPLE [(widetable)widetable.FieldSchema(name:c24, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c25 SIMPLE [(widetable)widetable.FieldSchema(name:c25, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c26 SIMPLE [(widetable)widetable.FieldSchema(name:c26, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c27 SIMPLE [(widetable)widetable.FieldSchema(name:c27, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c28 SIMPLE [(widetable)widetable.FieldSchema(name:c28, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c29 SIMPLE [(widetable)widetable.FieldSchema(name:c29, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c3 SIMPLE [(widetable)widetable.FieldSchema(name:c3, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c30 SIMPLE [(widetable)widetable.FieldSchema(name:c30, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c31 SIMPLE [(widetable)widetable.FieldSchema(name:c31, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c32 SIMPLE [(widetable)widetable.FieldSchema(name:c32, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c33 SIMPLE [(widetable)widetable.FieldSchema(name:c33, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c34 SIMPLE [(widetable)widetable.FieldSchema(name:c34, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c35 SIMPLE [(widetable)widetable.FieldSchema(name:c35, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c36 SIMPLE [(widetable)widetable.FieldSchema(name:c36, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c37 SIMPLE [(widetable)widetable.FieldSchema(name:c37, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c38 SIMPLE [(widetable)widetable.FieldSchema(name:c38, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c39 SIMPLE [(widetable)widetable.FieldSchema(name:c39, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c4 SIMPLE [(widetable)widetable.FieldSchema(name:c4, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c40 SIMPLE [(widetable)widetable.FieldSchema(name:c40, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c41 SIMPLE [(widetable)widetable.FieldSchema(name:c41, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c42 SIMPLE [(widetable)widetable.FieldSchema(name:c42, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c43 SIMPLE [(widetable)widetable.FieldSchema(name:c43, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c44 SIMPLE [(widetable)widetable.FieldSchema(name:c44, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c45 SIMPLE [(widetable)widetable.FieldSchema(name:c45, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c46 SIMPLE [(widetable)widetable.FieldSchema(name:c46, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c47 SIMPLE [(widetable)widetable.FieldSchema(name:c47, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c48 SIMPLE [(widetable)widetable.FieldSchema(name:c48, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c49 SIMPLE [(widetable)widetable.FieldSchema(name:c49, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c5 SIMPLE [(widetable)widetable.FieldSchema(name:c5, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c50 SIMPLE [(widetable)widetable.FieldSchema(name:c50, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c51 SIMPLE [(widetable)widetable.FieldSchema(name:c51, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c52 SIMPLE [(widetable)widetable.FieldSchema(name:c52, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c53 SIMPLE [(widetable)widetable.FieldSchema(name:c53, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c54 SIMPLE [(widetable)widetable.FieldSchema(name:c54, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c55 SIMPLE [(widetable)widetable.FieldSchema(name:c55, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c56 SIMPLE [(widetable)widetable.FieldSchema(name:c56, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c57 SIMPLE [(widetable)widetable.FieldSchema(name:c57, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c58 SIMPLE [(widetable)widetable.FieldSchema(name:c58, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c59 SIMPLE [(widetable)widetable.FieldSchema(name:c59, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c6 SIMPLE [(widetable)widetable.FieldSchema(name:c6, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c60 SIMPLE [(widetable)widetable.FieldSchema(name:c60, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c61 SIMPLE [(widetable)widetable.FieldSchema(name:c61, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c62 SIMPLE [(widetable)widetable.FieldSchema(name:c62, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c63 SIMPLE [(widetable)widetable.FieldSchema(name:c63, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c64 SIMPLE [(widetable)widetable.FieldSchema(name:c64, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c65 SIMPLE [(widetable)widetable.FieldSchema(name:c65, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c66 SIMPLE [(widetable)widetable.FieldSchema(name:c66, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c7 SIMPLE [(widetable)widetable.FieldSchema(name:c7, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c8 SIMPLE [(widetable)widetable.FieldSchema(name:c8, 
type:int, comment:null), ]
+POSTHOOK: Lineage: res0.c9 SIMPLE [(widetable)widetable.FieldSchema(name:c9, 
type:int, comment:null), ]
+PREHOOK: query: select 'expected 2',count(*) from res0
+PREHOOK: type: QUERY
+PREHOOK: Input: default@res0
+#### A masked pattern was here ####
+POSTHOOK: query: select 'expected 2',count(*) from res0
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@res0
+#### A masked pattern was here ####
+expected 2     2

Reply via email to