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

[jira] [Comment Edited] (CALCITE-4015) Pass through parent collation request on subset or superset of join keys for EnumerableMergeJoin

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

Rui Wang edited comment on CALCITE-4015 at 6/7/20, 7:31 AM:
------------------------------------------------------------

Superset case is actually not feasible. 

For example:
{code:java}
select * from foo join bar on foo.a=bar.a and foo.b=bar.b order by foo.a, foo.b, foo.c;
{code}

in this case, we don't know which column is bar.c.


was (Author: amaliujia):
Superset case is actually not feasible. 

For example:
{code:java}
select * from foo join bar on foo.a=bar.a and foo.b=bar.b order by foo.a, foo.b, foo.c;
{code}

in this case, we don't know what is bar.c.

> Pass through parent collation request on subset or superset of join keys for EnumerableMergeJoin
> ------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-4015
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4015
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Haisheng Yuan
>            Assignee: Rui Wang
>            Priority: Major
>             Fix For: 1.24.0
>
>
> Pass through parent collation request on subset or superset of join keys for EnumerableMergeJoin.
> e.g.
> {code:java}
> select * from foo join bar on foo.a=bar.a and foo.b=bar.b order by foo.b;
> {code}
> collation on b is passed to mergejoin, mergejoin should generate an alternative with collation on b, a.
> {code:java}
> select * from foo join bar on foo.a=bar.a and foo.b=bar.b order by foo.a, foo.b, foo.c;
> {code}
> collation on a,b,c is passed to mergejoin, mergejoin should generate an alternative with collation on a,b,c, even the join keys are a,b, but since foo.c is also the output column, mergejoin can still request its child foo to deliver collation on a,b,c. The join keys must be the collation request's prefixes (keys order is not required to be reserved).



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