You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Sean Hsuan-Yi Chu (JIRA)" <ji...@apache.org> on 2015/03/19 23:24:38 UTC
[jira] [Comment Edited] (DRILL-1941) select from subquery having an
order by fails
[ https://issues.apache.org/jira/browse/DRILL-1941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14370244#comment-14370244 ]
Sean Hsuan-Yi Chu edited comment on DRILL-1941 at 3/19/15 10:24 PM:
--------------------------------------------------------------------
The original failing query was a little too complex. I simplify it to the following:
{code:sql}
"select q.name as name, q.comment as comment \n" +
"from \n" +
"(select employee.first_name as name, nation.n_comment as comment, employee.full_name AS full_name \n" +
"from cp.`tpch/nation.parquet` nation INNER JOIN cp.`employee.json` employee \n" +
"on (nation.n_nationkey = employee.employee_id) \n" +
"order by employee.full_name) q";
{code}
was (Author: seanhychu):
The original failing query was a little too complex. I simplify it to the following:
{code:sql}
"select q.name as name, q.comment as comment \n" +
"from \n" +
"(select employee.first_name as name, nation.n_comment as comment, employee.full_name AS full_name \n" +
"from cp.`tpch/nation.parquet` nation INNER JOIN cp.`employee.json` employee \n" +
"on (nation.n_nationkey = employee.employee_id) \n" +
"order by employee.full_name) q";
{code}
> select from subquery having an order by fails
> ---------------------------------------------
>
> Key: DRILL-1941
> URL: https://issues.apache.org/jira/browse/DRILL-1941
> Project: Apache Drill
> Issue Type: Bug
> Components: Query Planning & Optimization
> Affects Versions: 0.8.0
> Reporter: Krystal
> Assignee: Sean Hsuan-Yi Chu
> Fix For: 0.9.0
>
> Attachments: drill_err.log
>
>
> git.commit.id.abbrev=b491cdb
> The following query fails:
> 0: jdbc:drill:schema=dfs> select q.name as name, q.registration as registration from (select cast(student.name as varchar(30)) as name, cast(voter.registration as varchar(20)) as registration from `dfs`.`default`.`voter` voter full outer join `dfs`.`default`.`./student` student on (student.name = voter.name) where student.age < 30 order by student.name) q;
> Query failed: Query failed: Unexpected exception during fragment initialization: -1
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> Running the same query with "explain plan for" also fail with the same error. If I remove the "order by student.name" from the sub-query, the query run successfully.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)