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/02/04 19:18:36 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=14305653#comment-14305653 ] 

Rahul Challapalli commented on DRILL-2096:
------------------------------------------

When I increased the data set to contain 100000 records instead of 1, I at-least see something in the logs now. 
Query :
{code}
select d.uid, d.map.rm from `data.json` d order by d.uid;
{code}

Error from the logs :
{code}
2015-02-04 18:15:39,227 [2b2d9e35-7b25-dc69-7e1c-ef7647250d48:frag:1:0] WARN  o.a.d.e.w.fragment.FragmentExecutor - Error while initializing or executing fragment
java.lang.NullPointerException: null
2015-02-04 18:15:39,227 [2b2d9e35-7b25-dc69-7e1c-ef7647250d48:frag:1:0] ERROR o.a.drill.exec.ops.FragmentContext - Fragment Context received failure.
java.lang.NullPointerException: null
2015-02-04 18:15:39,227 [2b2d9e35-7b25-dc69-7e1c-ef7647250d48:frag:1:0] ERROR o.a.d.e.w.f.AbstractStatusReporter - Error 8d4ecd22-d9f3-40ae-bbf7-491fe410137b: Failure while running fragment.
java.lang.NullPointerException: null
2015-02-04 18:15:39,229 [BitServer-4] INFO  o.a.drill.exec.work.foreman.Foreman - State change requested.  RUNNING --> FAILED
org.apache.drill.exec.rpc.RemoteRpcException: Failure while running fragment.[ 8d4ecd22-d9f3-40ae-bbf7-491fe410137b on qa-node190.qa.lab:31010 ]
[ 8d4ecd22-d9f3-40ae-bbf7-491fe410137b on qa-node190.qa.lab:31010 ]

        at org.apache.drill.exec.work.foreman.QueryManager.statusUpdate(QueryManager.java:95) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.rpc.control.WorkEventBus.status(WorkEventBus.java:75) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.work.batch.ControlHandlerImpl.handle(ControlHandlerImpl.java:82) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.rpc.control.ControlServer.handle(ControlServer.java:60) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.rpc.control.ControlServer.handle(ControlServer.java:38) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.rpc.RpcBus.handle(RpcBus.java:58) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:194) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:173) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) [netty-codec-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [netty-codec-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:161) [netty-codec-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [netty-common-4.0.24.Final.jar:4.0.24.Final]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
{code}

> 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 - Relational Operators
>            Reporter: Rahul Challapalli
>            Assignee: Mehant Baid
>            Priority: Critical
>
> 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)