Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
Impala 2.2
-
None
Description
Steps to reproduce:
create table tt1 (a int, b int); insert into tt1 values ((1,1), (2,2)); create table tt2 (a int, b int); insert into tt2 values ((1,1), (2,2)); create function identity(int) returns int location '/test-warehouse/libTestUdfs.so' symbol='Identity';
The following query returns nulls in the columns of the outer joined table.
select * from tt1 left outer join (select coalesce(identity(a), 1) as b from tt2) tt3 on tt1.a = tt3.b;
The issue also appears when no UDFs are used in the coalesce expression, as follows:
select * from tt1 left outer join (select coalesce(a, 1) as b from tt2) tt3 on tt1.a = tt3.b;