You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Rahul Challapalli (JIRA)" <ji...@apache.org> on 2015/04/22 02:06:58 UTC

[jira] [Closed] (DRILL-2096) Projecting a repeated map along with an order by results in an error

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

Rahul Challapalli closed DRILL-2096.
------------------------------------

Verified and re-arranged the below testcases :

Functional/Passing/flatten_operators/2rows/orderby10_DRILL-2099.q
Functional/Passing/flatten_operators/2rows/orderby3_DRILL-2099.q
Functional/Passing/flatten_operators/2rows/orderby23_DRILL-2099.q
Functional/Passing/flatten_operators/2rows/orderby9_DRILL-2099.q

> Projecting a repeated map along with an order by results in an error
> --------------------------------------------------------------------
>
>                 Key: DRILL-2096
>                 URL: https://issues.apache.org/jira/browse/DRILL-2096
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Data Types, Execution - Relational Operators
>            Reporter: Rahul Challapalli
>            Assignee: Mehant Baid
>            Priority: Critical
>             Fix For: 0.9.0
>
>
> git.commit.id.abbrev=3e33880
> Data Set :
> {code}
> {
>     "uid": 1,
>     "map": {
>         "rm": [
>             {
>                 "mapid": "m1",
>                 "mapvalue": {
>                     "col1": 1,
>                     "col2": [0,1,2,3,4,5]
>                 },
>                 "rptd": [
>                     { "a": "foo"},
>                     { "b": "boo"}
>                 ]
>             },
>             {
>                 "mapid": "m2",
>                 "mapvalue": {
>                     "col1": 0,
>                     "col2": []
>                 },
>                 "rptd": [
>                     { "a": "bar"},
>                     { "c": 1},
>                     { "d": 4.5}
>                 ]
>             }
>         ]
>     }
> }
> {code}
> {code}
> 0: jdbc:drill:schema=dfs.drillTestDir> select s.uid, s.rms.rptd from (select d.uid, flatten(d.map.rm) rms from `data.json` d) s order by s.rms.mapid;
> Error: exception while executing query: null (state=,code=0)
> {code}
> Explain Plan for the above query
> {code}
> 00-00    Screen
> 00-01      Project(uid=[$0], EXPR$1=[$1])
> 00-02        SelectionVectorRemover
> 00-03          Sort(sort0=[$2], dir0=[ASC])
> 00-04            Project(uid=[$0], EXPR$1=[ITEM($1, 'rptd')], EXPR$2=[ITEM($1, 'mapid')])
> 00-05              Project(uid=[$0], rms=[$2])
> 00-06                Flatten(flattenField=[$2])
> 00-07                  Project(EXPR$0=[$0], EXPR$1=[$1], EXPR$2=[ITEM($1, 'rm')])
> 00-08                    Scan(groupscan=[EasyGroupScan [selectionRoot=/drill/testdata/flatten_operators/temp2.json, numFiles=1, columns=[`uid`, `map`.`rm`], files=[maprfs:/drill/testdata/flatten_operators/data.json]]])
> {code}
> However the below query works (It project an index in the repeated list)
> {code}
> select s.uid, s.rms.rptd[0] from (select d.uid, flatten(d.map.rm) rms from `data.json` d) s order by s.rms.mapid;
> {code}
> The logs are not entorely helpful here. Drill fails to propagate the error back for some reason. DRILL-2085 has been raised to track this
> {code}
> 2015-01-28 19:21:10,232 [2b36c959-3087-63d6-9a20-ca45fdb875f1:foreman] INFO  o.a.drill.exec.work.foreman.Foreman - State change requested.  PENDING --> RUNNING
> 2015-01-28 19:21:10,320 [UserServer-1] INFO  o.a.drill.exec.work.foreman.Foreman - State change requested.  RUNNING --> CANCELED
> 2015-01-28 19:21:10,336 [UserServer-1] INFO  o.a.drill.exec.work.foreman.Foreman - State change requested.  CANCELED --> COMPLETED
> 2015-01-28 19:21:10,336 [UserServer-1] WARN  o.a.drill.exec.work.foreman.Foreman - Dropping request to move to COMPLETED state as query is already at CANCELED state (which is terminal).
> {code} 



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