[
https://issues.apache.org/jira/browse/CALCITE-6961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mihai Budiu resolved CALCITE-6961.
----------------------------------
Resolution: Fixed
Fixed in
https://github.com/apache/calcite/commit/326321dec53be7f38333db7204ecba33d64d401e
Thank you for the fix [~xuzifu666]
Thank reviewers [~asolimando][~jensen]
> Support LogicalRepeatUnion in RelShuttle
> ----------------------------------------
>
> Key: CALCITE-6961
> URL: https://issues.apache.org/jira/browse/CALCITE-6961
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.39.0
> Reporter: Yu Xu
> Assignee: Yu Xu
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.40.0
>
>
> follow https://issues.apache.org/jira/browse/CALCITE-6959
> Currently RelShuttle also do not support LogicalRepeatUnion (I also had check
> for other Logical Type, seems remain LogicalRepeatUnion need to support) :
> # *LogicalRepeatUnion* *is not overridden for accept(RelShuttle shuttle) ;*
> # *RelShuttle#visit not support for* *LogicalRepeatUnion* *;*
> so follow test would not work:
> {code:java}
> @Test void testRelShuttleForLogicalRepeatUnion() {
> final String sql = "WITH RECURSIVE delta(n) AS (\n"
> + "VALUES (1)\n"
> + "UNION ALL\n"
> + "SELECT n+1 FROM delta WHERE n < 10\n"
> + ")\n"
> + "SELECT * FROM delta";
> final RelNode rel = sql(sql).toRel();
> final List<RelNode> rels = new ArrayList<>();
> final RelShuttleImpl visitor = new RelShuttleImpl() {
> @Override public RelNode visit(LogicalRepeatUnion repeatUnion) {
> RelNode visitedRel = super.visit(repeatUnion);
> rels.add(visitedRel);
> return visitedRel;
> }
> };
> rel.accept(visitor);
> assertThat(rels, hasSize(1));
> assertThat(rels.get(0), instanceOf(LogicalRepeatUnion.class));
> } {code}
> others in Logic seams OK for it, need a pr to fix it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)