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

Jinfeng Ni commented on DRILL-1889:
-----------------------------------

Revise the code based on the comments. Add the comments to the code. Also, 
rename method isRegularColumn() to isRegularColumnOrExp() to make it cleaner. 

Also, there is incorrect result issue for query like "select *, col, *, col 
from t".  The last "col" will be missing in the output.  The plan for this 
query looks OK and the bug seems to be in execution operator 
(ProjectRecordBatch). Husan will open a different JIRA and submit a patch, as 
he has prototyped a fix for this issue.





> when 'select *' is used along with an order by on length of a column, Drill 
> is adding the computed length to the list of columns
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-1889
>                 URL: https://issues.apache.org/jira/browse/DRILL-1889
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>            Reporter: Rahul Challapalli
>            Assignee: Jinfeng Ni
>            Priority: Critical
>             Fix For: 0.9.0
>
>         Attachments: 
> 0001-DRILL-1889-Fix-star-column-prefix-and-subsume-logic-.patch.3
>
>
> git.commit.id.abbrev=9dfa4a1
> Dataset :
> {code}
> {
>  "col1":1,
>  "col2":"a"
> }
> {
>  "col1":2,
>  "col2":"b"
> }
> {
>  "col1":2,
>  "col2":"abc"
> }
> {code}
> Query :
> {code}
>  select * from `b.json` order by length(col2);
> +------------+------------+------------+
> |    col1    |    col2    |   EXPR$1   |
> +------------+------------+------------+
> | 1          | a          | 1          |
> | 2          | b          | 1          |
> | 2          | abc        | 3          |
> +------------+------------+------------+
> {code}
> Drill adds the length column. (EXPR$1) Not sure if this is intended behavior 
> since postgres does not do this



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

Reply via email to