[ 
https://issues.apache.org/jira/browse/CALCITE-1956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16135957#comment-16135957
 ] 

Julian Hyde commented on CALCITE-1956:
--------------------------------------

MultiJoin relies on the fact that join is associative (i.e. "a join (b join c)" 
== "(a join b) join c") and commutative (i.e. "a join (b join c)" == "a join (c 
join b)"). It works by dismembering a join graph into component parts then 
re-assembling it.

Inner join has the associative and commutative properties, left and right joins 
have those properties under some restricted circumstances, and full joins have 
those properties in even more restricted circumstances. Figuring out those 
"restricted circumstances" is not trivial. I suspect we'd have to disallow 
certain re-assembly patterns if joins have "moved through an outer" in some 
sense.

> Allow MultiJoin to contain multiple FULL joins
> ----------------------------------------------
>
>                 Key: CALCITE-1956
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1956
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: MinJi Kim
>            Assignee: Julian Hyde
>
> JoniToMultiJoinRule collapses multiple INNER joins into a single MultiJoin.  
> I was wondering if all the joins are full outer joins, couldn't we use the 
> same logic to allow MultiJoins to contains multiple FULL joins?  This would 
> allow LoptOptimizeJoinRule to re-order full outer joins, just like inner 
> joins.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to