[
https://issues.apache.org/jira/browse/HIVE-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Phabricator updated HIVE-2597:
------------------------------
Attachment: HIVE-2597.D8967.1.patch
navis requested code review of "HIVE-2597 [jira] Repeated key in GROUP BY is
erroneously displayed when using DISTINCT".
Reviewers: JIRA
HIVE-2597 Repeated key in GROUP BY is erroneously displayed when using DISTINCT
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.
TEST PLAN
EMPTY
REVISION DETAIL
https://reviews.facebook.net/D8967
AFFECTED FILES
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
ql/src/test/queries/clientpositive/groupby_constant.q
ql/src/test/results/clientpositive/groupby_constant.q.out
MANAGE HERALD RULES
https://reviews.facebook.net/herald/view/differential/
WHY DID I GET THIS EMAIL?
https://reviews.facebook.net/herald/transcript/21711/
To: JIRA, navis
> Repeated key in GROUP BY is erroneously displayed when using DISTINCT
> ---------------------------------------------------------------------
>
> Key: HIVE-2597
> URL: https://issues.apache.org/jira/browse/HIVE-2597
> Project: Hive
> Issue Type: Bug
> Reporter: Alex Rovner
> Assignee: Navis
> Attachments: HIVE-2597.D8967.1.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira