Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 1.3.1, Impala 1.4
-
None
Description
The following query returns incorrect results but the the equivalent [broadcast] version returns correct results.
The reason is that we hoist up the compatible agg child fragment into the partitioned join fragment, but the hoisted-up agg fragment has an exchange that hashes on "c" as a int type. Even though the "c" columns are value equivalent their hashes are only equal if hashed as the same type.
One way to fix this could be to add a cast to the data exchange of the agg fragment.
create table foo (c int); insert into foo values(1),(2),(3),(4),(5),(6); create table bar (c bigint); insert into bar values(1),(2),(3),(4),(5),(6); select f.c, b.c from (select c from foo union select c from foo) f inner join [shuffle] (select c from bar union select c from bar) b on f.c = b.c