[ https://issues.apache.org/jira/browse/CALCITE-2363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16521766#comment-16521766 ]
Teruyoshi Zenmyo commented on CALCITE-2363: ------------------------------------------- I have created a PR ( [https://github.com/apache/calcite/pull/740]). The commit ([https://github.com/apache/calcite/pull/740/commits/9d371496ff989075d5acd84d3e3b85717e3da459)] includes the main points of the modification. The change has become larger than I expected and it may break backward compatibility. If this change is acceptable and breaks the backward compatibility, I'd like to try to update the patch for fixing the compatibility. > Refactor RelShuttle not to depend on structures of RelNodes > ----------------------------------------------------------- > > Key: CALCITE-2363 > URL: https://issues.apache.org/jira/browse/CALCITE-2363 > Project: Calcite > Issue Type: Improvement > Reporter: Teruyoshi Zenmyo > Assignee: Julian Hyde > Priority: Major > > Currently, RelShuttle implementations depends on the structures of RelNodes. > For instance, RelShuttleImp.visit(LogicalAggregate aggregate) knows the first > element of getInput() is the next element to be visited. > [https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/rel/RelShuttleImpl.java#L75] > > By this refactoring, implementations of RelShuttle will become free from > invoking super.visit methods. > https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql2rel/CorrelationReferenceFinder.java#L61 -- This message was sent by Atlassian JIRA (v7.6.3#76005)