[
https://issues.apache.org/jira/browse/CALCITE-1681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15901880#comment-15901880
]
Remus Rusanu edited comment on CALCITE-1681 at 3/8/17 7:52 PM:
---------------------------------------------------------------
since the change does not show any actual implementation of {{copyTo}}, here is
an example for {{HiveFilter}}:
{noformat}
@Override
public RelNode copyTo(
RelOptCluster target,
RelTraitSet traitSet,
List<RelNode> inputs) {
assert inputs.size() == 1;
final RexNode condition = this.condition.accept(new
RexCopier(target.getRexBuilder()));
return new HiveFilter(target, traitSet, inputs.get(0), condition);
}
{noformat}
was (Author: rusanu):
since the change does not show any actual implementation of {copyTo}, here is
an example for {HiveFilter}:
{{noformat}}
@Override
public RelNode copyTo(
RelOptCluster target,
RelTraitSet traitSet,
List<RelNode> inputs) {
assert inputs.size() == 1;
final RexNode condition = this.condition.accept(new
RexCopier(target.getRexBuilder()));
return new HiveFilter(target, traitSet, inputs.get(0), condition);
}
{{noformat}}
> 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)