[
https://issues.apache.org/jira/browse/CALCITE-2803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16752591#comment-16752591
]
Laurent Goujon commented on CALCITE-2803:
-----------------------------------------
One possible solution is to normalize the join condition just before using
{{PushProjector}} so that the expanded {{IS NOT DISTINCT FROM}} expressions are
converted back into the collapsed version, and so doesn't cause extra
expressions to be created.
Another solution is not to modify filter condition since this is also managed
by {{JoinPushExpressionsRule}} anyway.
> Identify expanded IS NOT DISTINCT FROM expression when pushing project past
> join
> --------------------------------------------------------------------------------
>
> Key: CALCITE-2803
> URL: https://issues.apache.org/jira/browse/CALCITE-2803
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Laurent Goujon
> Assignee: Julian Hyde
> Priority: Major
>
> {{IS NOT DISTINCT FROM}} expressions in join condition might actually be
> considered as equi-join conditions, and {{RelOptUtil#splitJoinConditions()}}
> has support for it. But some other join related functions/rules don't.
> One of them is {{ProjectJoinTransposeRule}} which tries to push project
> expressions below the join, but ends up modifying the join expression too by
> pushing complex expression below.
> For example expression {{OR(AND(IS_NULL($1), IS_NULL($4)), EQUALS($1,$4))}}
> will be changed into {{OR(AND($3, $6), EQUALS($1, $5))}} which makes it
> harder/impossible for {{RelOptUtil#splitJoinConditions()}} to identify an
> {{IS NOT DISTINCT FROM}} equi-join condition.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)