hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shelukhin (JIRA)" <>
Subject [jira] [Commented] (HIVE-8512) queries with star and aggregate should fail
Date Thu, 13 Nov 2014 20:35:34 GMT


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:
>             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

View raw message