Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 2.2
-
None
-
Impala v2.2.0-cdh5.4.2 on CentOS 6.5
Description
As shown below, queries that combine SELECT DISTINCT with a HAVING clause (but without a GROUP BY clause) containing an aggregate function fail with an uninformative error message, rather than the expected "ERROR: AnalysisException: cannot combine SELECT DISTINCT with aggregate functions or GROUP BY".
> select * from test2; Query: select * from test2 +-------------+------+-----+ | id | num | prt | +-------------+------+-----+ | charlie | NULL | t2 | | asdfssdfasd | NULL | tst | | asdfs | NULL | tst | +-------------+------+-----+ Fetched 3 row(s) in 0.39s > select distinct id from test2 having sum(num) > 0; Query: select distinct id from test2 having sum(num) > 0 ERROR: AnalysisException: null CAUSED BY: IllegalStateException: null