Steve Carlin created HIVE-26672:
-----------------------------------
Summary: Top N Key Operator should not be allowed to pass through
group by with grouping sets
Key: HIVE-26672
URL: https://issues.apache.org/jira/browse/HIVE-26672
Project: Hive
Issue Type: Bug
Components: Operators
Reporter: Steve Carlin
HIVE-22652 enabled the Top N Key operator to be pushed down through a group by
with grouping sets, but I think I have an example where this isn't correct.
If I take the following query:
SELECT a, b, sum(c) FROM t_test_grouping_sets GROUP BY a,b GROUPING SETS (())
ORDER BY b DESC LIMIT 1;
If we were to push the Top N Key operator all the way to the top, it would
produce incorrect results. We need to calculate the sum for all rows in the
query, so we don't want to limit the rows that are passed through.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)