[
https://issues.apache.org/jira/browse/CALCITE-1681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15903307#comment-15903307
]
Remus Rusanu edited comment on CALCITE-1681 at 3/9/17 4:20 PM:
---------------------------------------------------------------
I have updated the patch with an implementation which does not make any changes
in RelNode and the copy is carried out in RelCopier. Copy is implemented for
all LogicalXxx operators. Hive operators work by extending RelCopier to cover
HiveXxx operators.
For two of the cases, {{visit(TableScan...})}} and
{{visit(TablefunctionScan...)}}, I did not provide implementation because they
are base abstract classes and I have to think of a solution (eg. using
{{instanceof}}). I did not test Druid queries.
The copying of {{RelDataType}} instances between the clusters is pending, I
have to find if there is some out-of-the-box infrastructure to support it.
The Rex node are copied using {{RexCopier}} but the that class header states
bq. Due to the laziness of the author, not all Rex types are supported at
present
so any RexCopier restriction will apply to RelCopier as well.
was (Author: rusanu):
I have updated the patch with an implementation which does not make any changes
in RelNode and the copy is carried out in RelCopier. Copy is implemented for
all LogicalXxx operators. Hive operators work by extending RelCopier to cover
HiveXxx operators.
For two of the cases, {{visit(TableScan...})}} and
{{visit(TablefunctionScan...)}}, I did not provide implementation because they
are base abstract classes and I have to think of a solution (eg. using
{{instanceof}}). I did not test Druid queries.
The copying of {{RelDataType}} instances between the clusters is pending, I
have to find if there is some out-of-the-box infrastructure to support it.
The Rex node are copied using {{RexCopier}} but the that class header states
*Due to the laziness of the author, not all Rex types are supported at
present* so any RexCopier restriction will apply to RelCopier as well.
> Provide a way to copy RelNode trees between clusters
> ----------------------------------------------------
>
> 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 RelOptCluster to another.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)