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/04/03 02:22:52 UTC

[jira] [Commented] (DRILL-2095) Order by on a repeated index inside a sub query results in an NPE

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

Sean Hsuan-Yi Chu commented on DRILL-2095:
------------------------------------------

The issue is because subquery has an "order by" which does not show up in the main query.

In addition, "order by a repeated index" failed by a bug in CompoundIdentifierConverter (which was resolved).

So this issue actually duplicates DRILL-1941 (the exception is the same as DRILL-1942 if we run the master).

> Order by on a repeated index inside a sub query results in an NPE
> -----------------------------------------------------------------
>
>                 Key: DRILL-2095
>                 URL: https://issues.apache.org/jira/browse/DRILL-2095
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>            Reporter: Rahul Challapalli
>            Assignee: Jinfeng Ni
>            Priority: Critical
>             Fix For: 1.0.0
>
>
> git.commit.id.abbrev=3e33880
> Data Set :
> {code}
> {
>   "id" : 1,
>   "list" : [1,2]
> }
> {code}
> The below query succeeds
> {code}
> 0: jdbc:drill:schema=dfs.drillTestDir> select d.id id from `data.json` d order by d.list[0];
> +------------+
> |     id     |
> +------------+
> | 1          |
> +------------+
> 1 row selected (0.12 seconds)
> {code}
> However when we use the same query inside a sub-query we get an NPE
> {code}
> 0: jdbc:drill:schema=dfs.drillTestDir> select s.id from (select d.id id from `data.json` d order by d.list[0]) s;
> Query failed: NullPointerException: 
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}
> Explain plan also results in the same NPE for the above query



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