Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Filter R1.x=10 (R1 full outer join R2 on R1.y=R2.y)
Gets rewritten as
R1 left outer join R2 on R1.y=R2.y and R1.x=10.
This is obviously wrong and produces wrong result.
select count from(select ss.ss_sold_date_sk, ss.ss_item_sk, ss.ss_customer_sk from store_sales ss full outer join date_dim d on ss.ss_sold_date_sk = d.d_date_sk where ss.ss_item_sk = 4496)R;
produces wrong result due to above described problem.
Patch separates the join simplification from Join filter classification.
Predicate Push Down through Join would first simplify Outer Joins before applying predicate push down.