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

Mihai Budiu commented on CALCITE-7058:
--------------------------------------

I thought that RelDecorrelator was the way to go. I think [~suibianwanwan33] 
has spent quite some time trying to improve it.

I am also planning to start working on it more seriously.

Maybe we should discuss this as part of CALCITE-7031?

I think that the general decorrelator cannot be simply implemented as a series 
of planner rules, because the algorithm has a precondition that the left-hand 
side relation or a correlate has a specific shape (not a multiset). This can be 
enforced by having a recursive implementation, as in the RelDecorrelator. But I 
don't think this can be checked syntactically, in a normal planner rule. But in 
my mind a general decorrelator is based on a recursive implementation which 
invokes standard plan rewrite rules.

 

> Decorrelator may produce different column names
> -----------------------------------------------
>
>                 Key: CALCITE-7058
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7058
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.40.0
>            Reporter: Mihai Budiu
>            Assignee: Mihai Budiu
>            Priority: Minor
>
> In [CALCITE-7024] I have introduced an assertion (Litmus) check in the 
> decorrelator that the output relation type is identical to the input relation 
> type. This assertion is too strong, because the decorrelator sometimes 
> produces different column names in the result.
> This may be a bug, but in the meantime it can be side-stepped by making the 
> check a bit weaker: the types are identical up to column names.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to