[
https://issues.apache.org/jira/browse/ASTERIXDB-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15931362#comment-15931362
]
Yingyi Bu commented on ASTERIXDB-1847:
--------------------------------------
[[email protected]]
In the DDLs, the types of the two datasets are declared as "open" types.
Therefore, "name" could be a field in either Topics or Chirps, and the subquery
could be an independent subquery or a correlated subquery.
The following query is a valid query at compile time, just that for the given
data, in the runtime, "Chirps.name = 'Kindle' OR Chirps.name = 'Surface'"
always returns MISSING. But at compile time, we don't have the knowledge to
resolve the ambiguity.
SELECT btag, about FROM Chirps WHERE about IN
(SELECT Topics.tid FROM Topics WHERE Chirps.name = 'Kindle' OR Chirps.name =
'Surface') ;
> Confusing ambiguous alias error message
> ---------------------------------------
>
> Key: ASTERIXDB-1847
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-1847
> Project: Apache AsterixDB
> Issue Type: Bug
> Reporter: Michael J. Carey
> Assignee: Yingyi Bu
> Attachments: HW8_DataInit.txt, HW8_TableInit.txt
>
>
> This query, when run on the attached data:
> USE TopicalBird;
> SELECT btag, about FROM Chirps WHERE about IN
> (SELECT Topics.tid FROM Topics WHERE name = 'Kindle' OR name = 'Surface') ;
> Yields this error msg:
> Cannot resolve ambiguous alias reference for undefined identifier name
> [AlgebricksException]
> It's not obvious to naive users (or me :-)) why this is an ambiguous
> reference. Could we improve this error msg somehow? This may be a fairly
> typical error pattern for SQL --> SQL++ users -- i.e., they are used to SQL's
> unqualified column-naming permissiveness, and will carry those habits into
> NoSQL-land and then be perplexed at times.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)