You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Micah Gutman (JIRA)" <ji...@apache.org> on 2013/08/14 19:50:50 UTC

[jira] [Resolved] (HIVE-5083) Group by ignored when group by column is a partition column

     [ https://issues.apache.org/jira/browse/HIVE-5083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Micah Gutman resolved HIVE-5083.
--------------------------------

    Resolution: Not A Problem

The reported problem is just a symptom of a different known bug.
                
> Group by ignored when group by column is a partition column
> -----------------------------------------------------------
>
>                 Key: HIVE-5083
>                 URL: https://issues.apache.org/jira/browse/HIVE-5083
>             Project: Hive
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 0.11.0
>         Environment: linux
>            Reporter: Micah Gutman
>
> I have an external table X with partition date (a string YYYYMMDD):
> select X.date, count(*) from X group by X.date
> Rather then get a count breakdown by date, I get a single row returned with the count for the entire table. The "date" column returned in my single row appears to be the last partition in the table.
> Note results appear as expected if I select an arbitrary "real" column from my table:
> select X.foo, count(*) from X group by X.foo 
> correctly gives me a single row per value of X.foo.
> Also, my query works fine when I use the date column in the "where" clause, so the partition does seem to be working.
> select X.date, count(*) from X where X.date = "20130101"
> correctly gives me a single row with the count for the date 20130101.

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