Optimize plan created for join with USING clause#12193
Optimize plan created for join with USING clause#12193Praveen2112 wants to merge 1 commit intoprestodb:masterfrom
Conversation
|
#12192 should solve this, as user can do a |
here you want to eliminate that because whenever this can be handled in code generation (to avoid creation of these expression), but could also be addressed with a query transformation/simplification rule, as required information can be derived from the plan. at a technical level, this can be addressed by extending #12192 or writing some simplification Rule (see for example |
0d74315 to
dcd01e1
Compare
When a plan is created for
JoinwithUSINGclause , we create aProjectNodeon top ofJoinwith the following projectionsActually
Coalesceis required only for aFullJoin,Innerjoin l.k1 can't be null so we don't need theCoalesceand we can express it asl.k1Leftjoin if l.k1 is null then r.k1 would also be null so we don't needCoalesceand we can express it as 'l.k1Rightjoin if r.k1 is null then l.k1 would also be null and it can be expressed asr.k1(Please correct me If I am wring)This patch adds
Coalsceonly for aFULLjoin.