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

ASF GitHub Bot commented on TAJO-1359:
--------------------------------------

Github user hyunsik commented on the pull request:

    https://github.com/apache/tajo/pull/422#issuecomment-99991148
  
    The main cause is that my patch does not support direct projection of 
record type. In other words, the current work only support projecting primitive 
type fields in nested records. I'll support this feature and flatten operator 
in another jira issue. Now, I added logical planner to prohibit the direct 
projection of record type.
    
    ---
    
    
    
    
    
    
<sup>**[tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/SeqScanExec.java,
 line 198 
\[r6\]](https://reviewable.io:443/reviews/apache/tajo/422#-Jo8-AMBbSEZOQS3d0Cy-r6-198)**
 ([raw 
file](https://github.com/apache/tajo/blob/c5263f4e276abe3e42dbf99bf9dd87e142f67539/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/SeqScanExec.java#L198)):</sup>
    This was investigated at https://issues.apache.org/jira/browse/TAJO-1422. 
So, I'll remove this TODO comment.
    
    ---
    
    
<sup>**[tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/NameResolver.java,
 line 56 
\[r6\]](https://reviewable.io:443/reviews/apache/tajo/422#-Jo8-AME6RwC628sqVQV-r6-56)**
 ([raw 
file](https://github.com/apache/tajo/blob/c5263f4e276abe3e42dbf99bf9dd87e142f67539/tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/NameResolver.java#L56)):</sup>
    LogicalPreProcessor and LogicalPlanner changes all column names derived 
from relations are full qualified names. LogicalPlanner temporarily makes some 
short names during processing. So, the situation you mentioned won't occur in 
the current planner. 
    
    ---
    
    
<sup>**[tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/NameResolver.java,
 line 104 
\[r6\]](https://reviewable.io:443/reviews/apache/tajo/422#-Jo8-AME6RwC628sqVQV-r6-104)**
 ([raw 
file](https://github.com/apache/tajo/blob/c5263f4e276abe3e42dbf99bf9dd87e142f67539/tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/NameResolver.java#L104)):</sup>
    Done.
    
    ---
    
    
<sup>**[tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/NameResolver.java,
 line 223 
\[r6\]](https://reviewable.io:443/reviews/apache/tajo/422#-Jo8-AME6RwC628sqVQV-r6-223)**
 ([raw 
file](https://github.com/apache/tajo/blob/c5263f4e276abe3e42dbf99bf9dd87e142f67539/tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/NameResolver.java#L223)):</sup>
    This is only for developers misuse instead of users.
    
    ---
    
    
    Comments from the [review on 
Reviewable.io](https://reviewable.io:443/reviews/apache/tajo/422)
    <!-- Sent from Reviewable.io -->



> Add nested field projector and language extension to project nested record
> --------------------------------------------------------------------------
>
>                 Key: TAJO-1359
>                 URL: https://issues.apache.org/jira/browse/TAJO-1359
>             Project: Tajo
>          Issue Type: Sub-task
>          Components: parser, physical operator, planner/optimizer
>            Reporter: Hyunsik Choi
>            Assignee: Hyunsik Choi
>             Fix For: 0.11.0
>
>         Attachments: TAJO-1359.patch, TAJO-1359_2.patch, TAJO-1359_3.patch, 
> TAJO-1359_4.patch, TAJO-1359_5.patch, TAJO-1359_6.patch, TAJO-1359_7.patch
>
>
> We need to improve Projector class to get nested record fields, and we also 
> add some language extension to specify certain nested records in table 
> schema. Both works should be done together. Otherwise, we need to test an 
> entire work process.
> Using dot '.' would be good for the syntax to specify nested fields. Many 
> systems (Hive, Google BigQuery, and Drill) already use this syntax. Probably, 
> many users are familiar with this form.
> For example, if *employee* is a root nested record field and it includes 
> *age* and *name* fields, consisting two fields lastname and firstname, we can 
> specify them individually as follows:
> {code}
> SELECT employee.age, employee.name.lastname, employee.name.firstname FROM ...
> {code}



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

Reply via email to