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

    https://github.com/apache/drill/pull/549#discussion_r71921608
  
    --- 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 --
    
    Do you ask about clarification/github comment or code comment?
    Calcite parses the query with schema name in column name correctly. Then 
Drill reconverts SqlNode for supporting complex types 
[DRILL-932](https://issues.apache.org/jira/browse/DRILL-932). 
    But it was hardcoded: handled everything post two index as item operator 
(For column name in select clause `cp.employee.json.employee_id` SqlNode was 
`cp.employee.json['department_id']` instead of 
`cp.employee.json.department_id`).
    I added the case when full schema identifier is used in select clause to 
handle everything post two index (except schema identifier) as item operator. I 
made it by comparing column names identifiers with full schema identifiers from 
`from` and `join` clauses


---
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