[
https://issues.apache.org/jira/browse/CALCITE-7511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Venkata krishnan Sowrirajan updated CALCITE-7511:
-------------------------------------------------
Description:
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}
> 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
>
> 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)