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

Julian Hyde commented on CALCITE-2363:
--------------------------------------

I am a little skeptical that you can make it fully extensible without making it 
significantly harder to use. I kind of like how it handles the common 80% of 
cases fairly easily, and you have to build a custom visitor for the other 20%. 
That was actually a design goal when I wrote it. 

That said, refactoring may be possible - I’d like to see what you can come up 
with. 

> 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)

Reply via email to