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 2015/12/02 09:15:10 UTC

[jira] [Commented] (CALCITE-62) Allow a RelNode in a RelSet to return columns in permuted order

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

Julian Hyde commented on CALCITE-62:
------------------------------------

I have created a branch https://github.com/julianhyde/calcite/tree/62-join-output-mapping with a work-in-progress of one possible solution to this problem: adding a mapping field to Join.

> Allow a RelNode in a RelSet to return columns in permuted order
> ---------------------------------------------------------------
>
>                 Key: CALCITE-62
>                 URL: https://issues.apache.org/jira/browse/CALCITE-62
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: GitHub Import
>              Labels: github-import
>
> Currently a long planning process (e.g. JdbcTest.testIn) seems to fire a lot of rules about merging projects with projects, projects with calcs. I suspect that there are a lot of sets that are equivalent but for a permutation of the order of the columns.
> If each RelNode that was a member of a RelSet specified a permutation (possibly the identity) of its columns to match the order in the set, then many sets would be merged, and the search space would be much smaller.
> ProjectRels and CalcRels that are just a permutation (not to mention renames and the identity) would be identified and removed when the rel is registered.
> This change would increase complexity for people implementing rules. In addition to "RelNode RelOptRuleCall.rel(int)", there would be "Permutation RelOptRuleCall.permutation(int)", and we need to make sure that people remember to call permutation.
> Today people have to remember to write variants of a rule that match rels with and without intervening projects. With this change, the intervening projects would be rarer, so the simple rules would be applicable in more cases.
> ---------------- Imported from GitHub ----------------
> Url: https://github.com/julianhyde/optiq/issues/62
> Created by: [julianhyde|https://github.com/julianhyde]
> Labels: for-next-release, 
> Created at: Thu Oct 17 18:39:02 CEST 2013
> State: open



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)