Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-1314

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

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jsensarma Joydeep Sen Sarma
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: