Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Drill's merge join operator incorrectly returns unqualified rows, when join key is null value. For example,
alter session set `planner.enable_hashjoin` = false;
// Q1
select * from cp.`region.json` t1, cp.`region.json` t2 where t1.non_exist = t2.non_exist2 ;
Q1 should return 0 rows, since both left and right side of join comparison are NULL values. But Drill will return 12100 rows.
The cause of this problem is MergeJoin operator thinks a comparison between NULL and NULL is a qualified condition, and returns that pair of joining row.