Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
hive> select count('1') from src group by '1';
In the above query, while performing StatsOptimizer optimization we can safely ignore the group by on the constant key '1' since the above query will return the same result as "select count('1') from src".
Exception:
If src is empty, according to the SQL standard,
select count('1') from src group by '1'
and
select count('1') from src
should produce 1 and 0 rows respectively.
Attachments
Attachments
Issue Links
- relates to
-
CALCITE-1016 "GROUP BY constant" on empty relation should return 0 rows
- Closed
- links to