[
https://issues.apache.org/jira/browse/HIVE-8512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14211257#comment-14211257
]
Sergey Shelukhin commented on HIVE-8512:
----------------------------------------
The more fundamental problem is that when * is resolved, RR used it the one
from preceding operator, in this case GBY. This is incorrect, since * does not
refer to the columns produced by the GROUP BY.
For example, this (which is a valid it would seem, although strange; src
contains 2 columns) - "select *, sum(key) from src group by key, value"
duplicates the SUM column, because it derives * columns from operator generated
during group by
> queries with star and aggregate should fail
> -------------------------------------------
>
> Key: HIVE-8512
> URL: https://issues.apache.org/jira/browse/HIVE-8512
> Project: Hive
> Issue Type: Bug
> Reporter: Sergey Shelukhin
> Assignee: Sergey Shelukhin
>
> ctas_colname test uses these, for example
> This errors out: {noformat} select key, sum(key) from src;{noformat}
> But this passes: {noformat} select *, sum(key), count(value) from
> src;{noformat}
> It looks like it returns 2 sums and 2 counts
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)