Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 1.2.3
-
None
-
None
Description
Looks like a bug in subexpression elimination. I manually disabled it and the query results were correct even with codegen enabled.
Data
create table foo (x int, y int); insert into foo values(1, 1); insert into foo values(1, 2); insert into foo values(2, 2); insert into foo values(1, NULL); insert into foo values(2, NULL);
Query with codegen enabled
Query: select x > 1, y > 1, x from foo group by 1, 2, 3 +-------+-------+------+ | x > 1 | y > 1 | x | +-------+-------+------+ | false | NULL | NULL | | false | false | 1 | | true | NULL | NULL | | false | true | 1 | | true | true | 2 | +-------+-------+------+
Query with codegen disabled (or with codegen enabled but subexpr elim commented out)
Query: select x > 1, y > 1, x from foo group by 1, 2, 3 +-------+-------+---+ | x > 1 | y > 1 | x | +-------+-------+---+ | true | NULL | 2 | | false | false | 1 | | false | NULL | 1 | | false | true | 1 | | true | true | 2 | +-------+-------+---+