[
https://issues.apache.org/jira/browse/CALCITE-2626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17959615#comment-17959615
]
Ian Bertolacci commented on CALCITE-2626:
-----------------------------------------
Additionally, it creates a different names list for the frame from the join's
row type field names
For example `relBuilder.scan("table").scan("table").join(...)` the join node
that is constructed will have a row type where the RHS names will be suffixed
with "0", but the frame uses the raw names from the left and right side, so the
the names for the fields from the RHS have names in the frame which are
different from the names in the node.
Worse, I cant seem to ask the RelBuilder for what it believes the correct field
names are.
I can peek at the node stack to get the field names the RelNode thinks they
should be, but those are wrong.
So I have no way of programmatically extracting a valid field name for use in
`relBuilder.field( ... )`
> RelBuilder generates wrong field list for join
> ----------------------------------------------
>
> Key: CALCITE-2626
> URL: https://issues.apache.org/jira/browse/CALCITE-2626
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.17.0
> Reporter: Pavel Gubin
> Priority: Major
>
> When building OUTER JOIN RelBuilder doesn't change nullability of underlying
> fields just copying them as is. But with outer join fields shall become
> nullable at appropriate sides of join.
> The error is at these lines:
> https://github.com/apache/calcite/blob/fb7914ec61fc57c8348d9da144e2fbd608c00c61/core/src/main/java/org/apache/calcite/tools/RelBuilder.java#L1546
--
This message was sent by Atlassian Jira
(v8.20.10#820010)