drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aman Sinha (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-1302) Order by using table.col in subquery fails with ArrayIndexOutOfBoundsException
Date Fri, 03 Apr 2015 22:40:53 GMT

     [ https://issues.apache.org/jira/browse/DRILL-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Aman Sinha updated DRILL-1302:
------------------------------
    Assignee: Sean Hsuan-Yi Chu  (was: Aman Sinha)

> Order by using table.col in subquery fails with ArrayIndexOutOfBoundsException 
> -------------------------------------------------------------------------------
>
>                 Key: DRILL-1302
>                 URL: https://issues.apache.org/jira/browse/DRILL-1302
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>            Reporter: Krystal
>            Assignee: Sean Hsuan-Yi Chu
>             Fix For: 0.9.0
>
>
> git.commit.id.abbrev=687b9b0
> The following query runs successfully:
> select cast(student.name as varchar(30)) name, cast(voter.registration as varchar(20))
registration from voter full outer join student on (student.name = voter.name) where student.age
< 20 order by student.name;
> If I put the above query in a sub-select, it fails:
> 0: jdbc:drill:schema=dfs> select tbl.name, tbl.registration from (select cast(student.name
as varchar(30)) name, cast(voter.registration as varchar(20)) registration from `dfs`.`default`.`./voter`
voter full outer join `dfs`.`default`.`./student` student on (student.name = voter.name) where
student.age < 20 order by student.name) tbl;
> Query failed: Failure while parsing sql. -1 [fe42e70f-cf5b-4389-b879-5b1598ab887f]
> Error: exception while executing query: Failure while trying to get next result batch.
(state=,code=0)
> If I change the query using "order by name" without specifying the student table, the
query runs fine:
> 0: jdbc:drill:schema=dfs> select tbl.name, tbl.registration from (select cast(student.name
as varchar(30)) name, cast(voter.registration as varchar(20)) registration from `dfs`.`default`.`./voter`
voter full outer join `dfs`.`default`.`./student` student on (student.name = voter.name) where
student.age < 20 order by student.name) tbl;
> The student.name in the order by clause should work.



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

Mime
View raw message