[
https://issues.apache.org/jira/browse/HIVE-10901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15603097#comment-15603097
]
Ashutosh Chauhan commented on HIVE-10901:
-----------------------------------------
Calcite has a rewrite for this query pattern using grouping-sets which was
introduced in CALCITE-732 . However, while adapting that for hive ran into a
limitation of Hive which is HIVE-15045 Currently, Hive doesn't support grouping
sets when a column is part of both grouping set as well as aggregation
function, which is what rewrite of CALCITE-732 will result in.
This limitation is physical since it seems current GroupBy operator cannot
handle this use case.
> Optimize mutli column distinct queries
> ----------------------------------------
>
> Key: HIVE-10901
> URL: https://issues.apache.org/jira/browse/HIVE-10901
> Project: Hive
> Issue Type: New Feature
> Components: CBO, Logical Optimizer
> Affects Versions: 1.2.0
> Reporter: Mostafa Mokhtar
> Assignee: Ashutosh Chauhan
> Attachments: HIVE-10901.patch
>
>
> HIVE-10568 is useful only when there is a distinct on one column. It can be
> expanded for multiple column cases too.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)