Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-3818

Error when DISTINCT and GROUP BY is used in avro or json

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0, 1.2.0
    • Fix Version/s: 1.17.0
    • Component/s: Execution - RPC, SQL Parser
    • Labels:
      None
    • Environment:

      Linux Mint 17.1
      java version "1.7.0_80"
      Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
      Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

      Description

      Data

      { "a": { "b": { "c": "d" }, "e": 2 }}
      

      Query

      select DISTINCT(t.a.b.c), MAX(t.a.e)  FROM dfs.`json.json` t GROUP BY t.a.b.c LIMIT 1;
      

      Occurs on 1.1.0 and incubator-drill master

      +-------------------------------------------+
      |                 commit_id                 |
      +-------------------------------------------+
      | 9f54aac33df3e783c0192ab56c7e1313dbc823fa  |
      +-------------------------------------------+
      
      [Error Id: bb826851-d8cb-46f5-96c0-1ed01d3d8c45 on philix:31010]
      	at org.apache.drill.jdbc.impl.DrillCursor.nextRowInternally(DrillCursor.java:247)
      	at org.apache.drill.jdbc.impl.DrillCursor.loadInitialSchema(DrillCursor.java:290)
      	at org.apache.drill.jdbc.impl.DrillResultSetImpl.execute(DrillResultSetImpl.java:1359)
      	at org.apache.drill.jdbc.impl.DrillResultSetImpl.execute(DrillResultSetImpl.java:74)
      	at net.hydromatic.avatica.AvaticaConnection.executeQueryInternal(AvaticaConnection.java:404)
      	at net.hydromatic.avatica.AvaticaStatement.executeQueryInternal(AvaticaStatement.java:351)
      	at net.hydromatic.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:338)
      	at net.hydromatic.avatica.AvaticaStatement.execute(AvaticaStatement.java:69)
      	at org.apache.drill.jdbc.impl.DrillStatementImpl.execute(DrillStatementImpl.java:86)
      	at sqlline.Commands.execute(Commands.java:841)
      	at sqlline.Commands.sql(Commands.java:751)
      	at sqlline.SqlLine.dispatch(SqlLine.java:737)
      	at sqlline.SqlLine.begin(SqlLine.java:612)
      	at sqlline.SqlLine.start(SqlLine.java:366)
      	at sqlline.SqlLine.main(SqlLine.java:259)
      Caused by: org.apache.drill.common.exceptions.UserRemoteException: VALIDATION ERROR: java.lang.NullPointerException
      
      
      [Error Id: bb826851-d8cb-46f5-96c0-1ed01d3d8c45 on philix:31010]
      	at org.apache.drill.exec.rpc.user.QueryResultHandler.resultArrived(QueryResultHandler.java:118)
      	at org.apache.drill.exec.rpc.user.UserClient.handleReponse(UserClient.java:110)
      	at org.apache.drill.exec.rpc.BasicClientWithConnection.handle(BasicClientWithConnection.java:47)
      	at org.apache.drill.exec.rpc.BasicClientWithConnection.handle(BasicClientWithConnection.java:32)
      	at org.apache.drill.exec.rpc.RpcBus.handle(RpcBus.java:61)
      	at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:233)
      	at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:205)
      	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
      	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:254)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
      	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
      	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:242)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
      	at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
      	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:847)
      	at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:618)
      	at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:329)
      	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:250)
      	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
      	at java.lang.Thread.run(Thread.java:745)
      
      
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dekken Philip Deegan
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: