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

Zhen Chen commented on CALCITE-7511:
------------------------------------

I have linked the relevant JIRA tickets; perhaps we can resume the discussion 
here. We could focus our discussion on whether or not this blocking change is 
acceptable. Furthermore, we are about to release a new version, and we already 
have plenty of commits; should we include this in the new release?

> LogicalTableFunctionScan should override accept(RelShuttle) so dispatch 
> routes through RelShuttle.visit(TableFunctionScan)
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-7511
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7511
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Venkata krishnan Sowrirajan
>            Priority: Major
>              Labels: pull-request-available
>
> LogicalTableFunctionScan is missing the accept(RelShuttle) override that 
> every other logical rel has. Dispatch falls through to 
> AbstractRelNode.accept(RelShuttle), where this is statically typed as RelNode 
> — so Java selects RelShuttle.visit(RelNode) and never 
> visit(TableFunctionScan).
> A RelShuttleImpl subclass that overrides visit(TableFunctionScan) silently 
> no-ops on LogicalTableFunctionScan instances.
> Repro:
> {code:java}
>   RelNode root = builder.functionScan(rampFunction, 0, 
> builder.literal(3)).build();
>   boolean[] visited = {false};
>   root.accept(new RelShuttleImpl() {
>     @Override public RelNode visit(TableFunctionScan scan) {
>       visited[0] = true;
>       return super.visit(scan);
>     }
>   });
>   // Expected: visited[0] == true
>   // Actual:   visited[0] == false{code}



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

Reply via email to