[
https://issues.apache.org/jira/browse/CALCITE-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16417723#comment-16417723
]
Jesus Camacho Rodriguez commented on CALCITE-1965:
--------------------------------------------------
It is complex to add support for outer joins to existing rule based on
structural properties of the plan, as inner and outer joins properties are
different. The main concern is correctness of the rewriting. It is fine that
the rule only supports a few rewritings with outer joins, but we should bail
out to avoid producing incorrect rewritings. Hence, I think we need a more
detailed proposal on the different scenarios and how we can implement them,
some of the ideas/challenges have been sketched above in this issue by
[~christian.beikov] and myself.
I would like to work on this, but I am not sure when I will be able to spend
time on it. In the meantime, I will be happy to assist reviewing proposals,
ideas, etc.
> Support outer joins for materialized views
> ------------------------------------------
>
> Key: CALCITE-1965
> URL: https://issues.apache.org/jira/browse/CALCITE-1965
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Christian Beikov
> Assignee: Julian Hyde
> Priority: Major
>
> Currently, only inner joins are supported for materialized view
> substitutions. The support for outer joins involves creating new pulled up
> predicates in case of outer joins that represent semantics of the join. For a
> join predicate like "a.id = b.id" the inner join just pulls up that
> predicate. When having a left join like e.g. {{select * from a left join b on
> a.id = b.id}}, the actual pulled up predicate would be {{OR(=(a.id,
> b.id),ISNULL(b.id))}}. For a right join it would be {{OR(=(a.id,
> b.id),ISNULL(a.id))}} and for a full outer join it would be {{OR(=(a.id,
> b.id),ISNULL(a.id),ISNULL(b.id))}}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)