[
https://issues.apache.org/jira/browse/CALCITE-4007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17110727#comment-17110727
]
Julian Hyde commented on CALCITE-4007:
--------------------------------------
It should also allow more keys on the trailing edge. For example, if you are
joining T1 and T2 using (a, b) then if T1 is sorted by (a, b, x) and T2 is
sorted by (a, b, y, z) then the MergeJoin is valid and should succeed.
> MergeJoin collation check should not be limited to join key's order
> -------------------------------------------------------------------
>
> Key: CALCITE-4007
> URL: https://issues.apache.org/jira/browse/CALCITE-4007
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Haisheng Yuan
> Priority: Minor
>
> Given MergeJoin on foo.a=bar.a and foo.b=bar.b,
> The collation check on MergeJoin always require it is sorted by (a,b), but
> after 1.23.0 calcite can generate MergeJoin on collation of (b,a), or even
> (a,b,c), (b,a,c), which are all legit. We should relax the check condition.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)