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

Remus Rusanu commented on CALCITE-1681:
---------------------------------------

Rex nodes have a RexCopier shuttle that does a deep copy into a new builder.

For Rel nodes my thinking is to create a similar RelShuttle. RelNode exposes a 
{copy()} method but implementations clone themselves using their own cluster. 
Perhaps a new method {RelNode.cloneTo(RelOptCluster targetCluster)} and 
subtypes implement this appropriately, similar to how they override 
{RelNode.copy()}.

> Provide a way to copy RelNode trees between planners
> ----------------------------------------------------
>
>                 Key: CALCITE-1681
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1681
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Remus Rusanu
>            Assignee: Remus Rusanu
>
> In Hive we cache materialized view plans and reuse the cached plans in 
> queries. For this we need a way to do deep clone copy of a RelNode tree from 
> one builder to another.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to