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

Zhen Chen commented on CALCITE-6947:
------------------------------------

This actually addresses a similar issue to CALCITE-7511. Previously, there was 
no consensus regarding this breaking change. However, it appears that 
CALCITE-7511 now encompasses the modifications proposed here. If CALCITE-7511 
is sufficiently comprehensive, I believe this JIRA can be closed as a duplicate.

> Support LogicalSnapshot in RelShuttle
> -------------------------------------
>
>                 Key: CALCITE-6947
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6947
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.39.0
>            Reporter: Yu Xu
>            Assignee: Yu Xu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.42.0
>
>
> Currently RelShuttle do not support LogicalSnapshot , there 2 problem:
>  # *LogicalSnapshot is not overridden for accept(RelShuttle shuttle) ;*
>  # *RelShuttle#visit not support for LogicalSnapshot;*
> so follow test would not work:
> {code:java}
> @Test void testRelShuttleForLogicalSnapshot() {
>   final String sql = "select * from products_temporal "
>       + "for system_time as of TIMESTAMP '2011-01-02 00:00:00'";
>   final RelNode rel = sql(sql).toRel();
>   final List<RelNode> rels = new ArrayList<>();
>   final RelShuttleImpl visitor = new RelShuttleImpl() {
>     @Override public RelNode visit(LogicalSnapshot modify) {
>       RelNode visitedRel = super.visit(modify);
>       rels.add(visitedRel);
>       return visitedRel;
>     }
>   };
>   rel.accept(visitor);
>   assertThat(rels, hasSize(1));
>   assertThat(rels.get(0), instanceOf(LogicalSnapshot.class));
> } {code}
> Need to support LogicalTableModify in RelShuttle.



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

Reply via email to