Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.0
-
None
-
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
Attachments
Issue Links
- is duplicated by
-
HIVE-17043 Remove non unique columns from group by keys if not referenced later
- Closed