Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
The below query returns empty result. customer_parts table is partitioned table by c_custkey column. Orders table is inner join and customer_parts is outer join.
select a.l_orderkey, b.o_orderkey, c.c_custkey from lineitem a inner join orders b on a.l_orderkey = b.o_orderkey left outer join customer_parts c on a.l_orderkey = c.c_custkey and c.c_custkey < 0
Repartitioner class doesn't consider mixed join operator(inner and outer). In the upper query case there is three scans stats. customer_parts's stat is zero but customer_parts is outer join.
JoinNode joinNode = PlannerUtil.findMostBottomNode(execBlock.getPlan(), NodeType.JOIN); if (joinNode != null) { if ( (joinNode.getJoinType() == JoinType.INNER)) { for (int i = 0; i < stats.length; i++) { if (stats[i] == 0) { return; } } } }