Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 1.3
-
None
-
None
Description
I only tried this on master, 42db599d3485527db80483004ba6a73cb891d0d2
The first query below has an incorrect result in the first column, the value should be 0. The problem seems somehow related to using the same expression inside a count() and a count(distinct) in the same query.
[localhost:21000] > select COUNT(1), COUNT(DISTINCT 1) FROM functional.tinytable AS t1 WHERE false; Query: select COUNT(1), COUNT(DISTINCT 1) FROM functional.tinytable AS t1 WHERE false NULL 0 Returned 1 row(s) in 0.01s [localhost:21000] > select COUNT(1) FROM functional.tinytable AS t1 WHERE false; Query: select COUNT(1) FROM functional.tinytable AS t1 WHERE false 0 Returned 1 row(s) in 0.01s [localhost:21000] > select COUNT(DISTINCT 1) FROM functional.tinytable AS t1 WHERE false; Query: select COUNT(DISTINCT 1) FROM functional.tinytable AS t1 WHERE false 0 Returned 1 row(s) in 0.01s