XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • None
    • Logical Optimizer
    • None

    Description

      If columns are part of a GROUP BY expression and they are UNIQUE and do not accept NULL values, i.e. PK or UK+NOTNULL, the Aggregate operator can be transformed into a Project operator, as each row will end up in a different group.

      For instance, given that pk is the PRIMARY KEY for the table, the GROUP BY could be removed from grouping columns for following query:

      SELECT pk, value1
      FROM table_1
      GROUP BY value1, pk, value2;
      

      Attachments

        1. HIVE-17041.1.patch
          29 kB
          Vineet Garg

        Issue Links

          Activity

            People

              vgarg Vineet Garg
              jcamacho Jesús Camacho Rodríguez
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: