[
https://issues.apache.org/jira/browse/HIVE-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ashutosh Chauhan updated HIVE-2597:
-----------------------------------
Resolution: Fixed
Fix Version/s: 0.14.0
Status: Resolved (was: Patch Available)
Committed to trunk. Thanks, 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
> Fix For: 0.14.0
>
> Attachments: HIVE-2597.3.patch.txt, HIVE-2597.4.patch.txt,
> HIVE-2597.D8967.1.patch, HIVE-2597.D8967.2.patch
>
>
> The following query was simplified for illustration purposes.
> This works correctly:
> {code:sql}
> select client_tid, "" as myvalue1, "" as myvalue2 from clients cluster by
> client_tid
> {code}
> The intent here is to produce two empty columns in between data.
> The following query does not work:
> {code:sql}
> select distinct client_tid, "" as myvalue1, "" as myvalue2 from clients
> cluster by client_tid
> {code}
> {noformat}
> FAILED: Error in semantic analysis: Line 1:44 Repeated key in GROUP BY ""
> {noformat}
> 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 was sent by Atlassian JIRA
(v6.2#6252)