Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/549#discussion_r71918817
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/parser/CompoundIdentifierConverter.java
 ---
    @@ -115,6 +119,18 @@ public SqlNode visitChild(
               enableComplex = true;
             }
           }
    +      if (expr.getKind() == SqlKind.SELECT) {
    +        if (((SqlSelect) expr).getFrom() instanceof 
DrillCompoundIdentifier) {
    +          fullSchemasSet.add((DrillCompoundIdentifier) ((SqlSelect) 
expr).getFrom());
    +        } else if (((SqlSelect) expr).getFrom() instanceof SqlJoin) {
    --- End diff --
    
    Seems you are adding the schema-qualified table identifier. Will this logic 
work for nested subqueries? Normally, the name resolution will happen under 
certain name scope. I'm not clear that adding all the table identifier to this 
"fullSchemasSet" will work for name scope based resolution.
    
    Can you try some queries with nested subqueries with different 
schema-qualified tables?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to