----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/22901/ -----------------------------------------------------------
Review request for hive. Bugs: HIVE-2597 https://issues.apache.org/jira/browse/HIVE-2597 Repository: hive-git Description ------- The following query was simplified for illustration purposes. This works correctly: select client_tid, "" as myvalue1, "" as myvalue2 from clients cluster by client_tid The intent here is to produce two empty columns in between data. The following query does not work: select distinct client_tid, "" as myvalue1, "" as myvalue2 from clients cluster by client_tid FAILED: Error in semantic analysis: Line 1:44 Repeated key in GROUP BY "" The key is not repeated since the aliases were given. Seems like Hive is ignoring the aliases when the "distinct" keyword is specified. Diffs ----- ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java 8ae1c73 ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java cb284d7 ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java c60f56f ql/src/test/queries/clientpositive/groupby_duplicate_key.q PRE-CREATION ql/src/test/results/clientpositive/groupby_duplicate_key.q.out PRE-CREATION ql/src/test/results/compiler/plan/groupby1.q.xml af100ed ql/src/test/results/compiler/plan/groupby4.q.xml 1822733 ql/src/test/results/compiler/plan/groupby5.q.xml 0bfc684 ql/src/test/results/compiler/plan/groupby6.q.xml 5b3696c ql/src/test/results/compiler/plan/join1.q.xml e88d5dd ql/src/test/results/compiler/plan/join2.q.xml 11c44c7 ql/src/test/results/compiler/plan/join3.q.xml 6fde4e0 ql/src/test/results/compiler/plan/join4.q.xml 22a4911 ql/src/test/results/compiler/plan/join5.q.xml 5033366 ql/src/test/results/compiler/plan/join6.q.xml b1185a9 ql/src/test/results/compiler/plan/join7.q.xml a1ab3e6 ql/src/test/results/compiler/plan/join8.q.xml ba128d4 Diff: https://reviews.apache.org/r/22901/diff/ Testing ------- Thanks, Navis Ryu