Skip to content

[CALCITE-7085] JOIN USING with unqualified common column fails in a conformance where allowQualifyingCommonColumn is false (e.g. Oracle, Presto)#4912

Open
cjj2010 wants to merge 2 commits intoapache:mainfrom
cjj2010:CALCITE-7085
Open

Conversation

@cjj2010
Copy link
Copy Markdown
Contributor

@cjj2010 cjj2010 commented Apr 29, 2026

…onformance where allowQualifyingCommonColumn is false (e.g. Oracle, Presto)
@cjj2010 cjj2010 changed the title [CALCITE-7085] JOIN USING with unqualified common column fails with ORACLE [CALCITE-7085] JOIN USING with unqualified common column fails in a conformance where allowQualifyingCommonColumn is false (e.g. Oracle, Presto) Apr 29, 2026
new SqlIdentifier(
ImmutableList.of(child.name, name),
identifier.getParserPosition());
SqlParserPos.ZERO);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not look like a robust way to carry information between compilation stages; in general, the parser position is best-effort in Calcite.

There must be a better way to do this. My intuition tells me that the unparser has to handle this case by stripping out the qualifying information. Alternatively, can the join type be changed to an INNER JOIN?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your suggestion. The original plan was indeed inadequate. I have now revised it to completely separate validation from expansion — validating the original AST once before expansion, and not performing validation during expansion.

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants