You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2020/08/06 17:53:00 UTC

[jira] [Commented] (CALCITE-4010) Revise codegen for EnumerableMergeJoin to accept any sort order

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

Julian Hyde commented on CALCITE-4010:
--------------------------------------

ASC and DESC are OK, but the code should throw if it sees CLUSTERED.

> Revise codegen for EnumerableMergeJoin to accept any sort order
> ---------------------------------------------------------------
>
>                 Key: CALCITE-4010
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4010
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Haisheng Yuan
>            Assignee: Feng Zhu
>            Priority: Major
>
> Given MergeJoin on foo.a=bar.a and foo.b=bar.b,
> The codegen for EnumerableMergeJoin always sort tuples by ascending order, nulls last, but after 1.23.0 calcite can generate MergeJoin on collation of (b,a), or even (a,b,c), (b,a,c), with any asc/desc, null direction, which are all legit. So the codegen should sort tuples exactly according to the requirement of collation.
> See https://github.com/apache/calcite/blob/master/linq4j/src/main/java/org/apache/calcite/linq4j/EnumerableDefaults.java#L1966
> and
> https://github.com/apache/calcite/pull/1833#discussion_r384445110



--
This message was sent by Atlassian Jira
(v8.3.4#803005)