You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Joydeep Sen Sarma (JIRA)" <ji...@apache.org> on 2010/04/17 05:02:24 UTC

[jira] Created: (HIVE-1314) allow non-aggregate non-group-by columns in select expression for group-bys

allow non-aggregate non-group-by columns in select expression for group-bys
---------------------------------------------------------------------------

                 Key: HIVE-1314
                 URL: https://issues.apache.org/jira/browse/HIVE-1314
             Project: Hadoop Hive
          Issue Type: New Feature
            Reporter: Joydeep Sen Sarma


mysql calls them hidden columns/indeterminate results. See:

http://dev.mysql.com/doc/refman/5.0/en/group-by-hidden-columns.html

they are immensely useful. Many a time, i am joining a dimension table on it's unique key with a fact table and then a group to compute aggregates over fact table columns. i want to get a row with some/all the columns of the dimension table along with aggregates on columns in the fact table. Very standard use case.

In this case, one is forced to do a group by on not just the unique (join) key - but all the columns from the dimension table required in the final result. This is unnecessarily wasteful. We only need to group by on the unique key and then emit dimension table columns from one of the rows per group.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira