[
https://issues.apache.org/jira/browse/CALCITE-4915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17452596#comment-17452596
]
Julian Hyde commented on CALCITE-4915:
--------------------------------------
{quote}Because {{expandExprFromJoin}} is a static method,
{quote}
Ah, I missed that. Makes sense to add validator. Would it be better to make the
method non-static? That would not be a breaking change, because the method is
private. And it just seems to make sense.
It sounds like you've done the due diligence on star-expansion and testing.
Yes, three-way joins with NATURAL and USING are complex edge cases and should
be a separate Jira case. Without researching the SQL standard and other DBs we
probably don't even know what should be the right behavior. But please log the
Jira case to get the process started.
> Query with unqualified common column and NATURAL JOIN fails
> -----------------------------------------------------------
>
> Key: CALCITE-4915
> URL: https://issues.apache.org/jira/browse/CALCITE-4915
> Project: Calcite
> Issue Type: Bug
> Reporter: Aleksey Plekhanov
> Assignee: Aleksey Plekhanov
> Priority: Major
> Labels: pull-request-available
>
> Query with unqualified common column and NATURAL JOIN:
> {noformat}
> SELECT deptno FROM emp NATURAL JOIN dept{noformat}
> Fails with "Column 'DEPTNO' is ambiguous" error.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)