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

    https://github.com/apache/drill/pull/549#discussion_r71924583
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/parser/DrillCompoundIdentifier.java
 ---
    @@ -69,31 +70,38 @@ public void addIndex(int index, SqlParserPos pos){
         }
       }
     
    -  public SqlNode getAsSqlNode(){
    -    if(ids.size() == 1){
    +  public SqlNode getAsSqlNode(Set<DrillCompoundIdentifier> fullSchemasSet) 
{
    --- End diff --
    
    Calcite has a concept of a "namespace" that abstracts what columns are 
available in a table or sub-query. I think you should be using that rather than 
looking at the structure of the parse tree.
    
    There's a lot of code here, and it seems to duplicate (in a less general 
way) what is being done in Calcite. It's technical debt, and let me explain how 
it will bite Drill. I am working right now on 
https://issues.apache.org/jira/browse/CALCITE-1208 and making some significant 
changes to how name-resolution works. When I check in CALCITE-1208 there's a 
strong chance that the code in this PR will break, and as a result, it will 
take Drill even longer to get back onto Calcite master branch.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to