[
https://issues.apache.org/jira/browse/CALCITE-2554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16612301#comment-16612301
]
Stamatis Zampetakis commented on CALCITE-2554:
----------------------------------------------
I propose to adapt the EnumerableJoinRule so that it retains the RelCollation
trait from the left input and add a few tests over
org.apache.calcite.linq4j.EnumerableDefaults#join_ which verify that the order
of the left input remains intact.
> Enrich EnumerableJoin opetaror with order preserving information
> ----------------------------------------------------------------
>
> Key: CALCITE-2554
> URL: https://issues.apache.org/jira/browse/CALCITE-2554
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.17.0
> Reporter: Stamatis Zampetakis
> Assignee: Julian Hyde
> Priority: Minor
> Fix For: 1.18.0
>
>
> The EnumerableJoin operator is backed up by a join algorithm
> (org.apache.calcite.linq4j.EnumerableDefaults#join_) which preserves the
> order of the left (outer) input. However, this information is not reflected
> in the RelTraitSet and thus cannot be exploited by the optimizer. Without
> this information, sort operators following the join cannot be removed (using
> SortRemoveRule) leading to suboptimal plans.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)