[ 
https://issues.apache.org/jira/browse/ASTERIXDB-1650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15795493#comment-15795493
 ] 

ASF subversion and git services commented on ASTERIXDB-1650:
------------------------------------------------------------

Commit 44384a22643325bd0d16166d62a7a6d6c6bed3f4 in asterixdb's branch 
refs/heads/master from [~buyingyi]
[ https://git-wip-us.apache.org/repos/asf?p=asterixdb.git;h=44384a2 ]

ASTERIXDB-1650: fix undefined variable reference resolution.

The order of resolving a reference to an undefined variable is:
-- If the reference to an undefined variable is the binding expression for 
FROM/JOIN/UNNEST/Quantifier,
   then it can only be resolved to a dataset;
-- Otherwise, it is firstly resolved as a field-access. If the system couldn't 
find a candidate
   field access, it is then resolved to a dataset.

Change-Id: I24e4c1b38e53c97380cfb3e2e9b61cdd05fe7002
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1408
Sonar-Qube: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
BAD: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Reviewed-by: Till Westmann <[email protected]>


> The order of resolving undefined aliases
> ----------------------------------------
>
>                 Key: ASTERIXDB-1650
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1650
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: Translator - SQL++
>            Reporter: Yingyi Bu
>            Assignee: Yingyi Bu
>
> The order of resolving an undefined alias should be:
> Have different resolving mechanism for FROM/UNNEST/Quantifier and others:     
>                  
> -- FROM/JOIN/UNNEST/Quantifier:  1. user-defined variables,  2. Datasets
> -- Others: 1. user-defined variables, 2. field-accesses,  3. Datasets 
> Always resolving to a dataset as the last option can preserve query stability 
> such that the query semantics will not be perturbed by adding/removing a 
> dataset.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to