You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Holger Kiel (JIRA)" <ji...@apache.org> on 2017/06/25 09:03:00 UTC

[jira] [Created] (DRILL-5607) NullPointer Exception on jdbc source using limit 0

Holger Kiel created DRILL-5607:
----------------------------------

             Summary: NullPointer Exception on jdbc source using limit 0
                 Key: DRILL-5607
                 URL: https://issues.apache.org/jira/browse/DRILL-5607
             Project: Apache Drill
          Issue Type: Bug
          Components: Metadata
    Affects Versions: 1.10.0
         Environment: mariadb 10.0.29
            Reporter: Holger Kiel


Querying a jdbc datasource throws an exception when 'limit 0' is used to discover the schema: 

{code}
0: jdbc:drill:zk=localhost:2181> select * from mysql.drill_mysql_test.person limit 1;
+-----------+------------+-----------+---------+------+-------+-----+------+--------------+----------------+---------------+---------------+--------------+-------------+------------+------------+-----------------+------------+----------------+------------+------------+-----------------+-------------------+-----------------+------------+-----------+------------+
| person_id | first_name | last_name | address | city | state | zip | json | bigint_field | smallint_field | numeric_field | boolean_field | double_field | float_field | real_field | time_field | timestamp_field | date_field | datetime_field | year_field | text_field | tiny_text_field | medium_text_field | long_text_field | blob_field | bit_field | enum_field |
+-----------+------------+-----------+---------+------+-------+-----+------+--------------+----------------+---------------+---------------+--------------+-------------+------------+------------+-----------------+------------+----------------+------------+------------+-----------------+-------------------+-----------------+------------+-----------+------------+
| 1 | first_name_1 | last_name_1 | 1401 John F Kennedy Blvd | Philadelphia | PA | 19107 | { a : 5, b : 6 } | 123456789 | 1 | 10.01 | false | 1.0 | 1.1 | 1.2 | 12:00:01 | 2012-02-29 12:00:01.0 | 2012-02-29 | 2012-02-29 12:00:01.0 | 2015-01-01 | It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout | xxx | a medium piece of text | a longer piece of text this is going on..... | [B@79c5636f | true | XXX |
+-----------+------------+-----------+---------+------+-------+-----+------+--------------+----------------+---------------+---------------+--------------+-------------+------------+------------+-----------------+------------+----------------+------------+------------+-----------------+-------------------+-----------------+------------+-----------+------------+
1 row selected (0,257 seconds)
0: jdbc:drill:zk=localhost:2181> select * from mysql.drill_mysql_test.person *limit 0*;
Error: SYSTEM ERROR: NullPointerException


[Error Id: 977858d8-ed05-4a94-a28b-931ee870826f on localhost:31010] (state=,code=0)
java.sql.SQLException: SYSTEM ERROR: NullPointerException


[Error Id: 977858d8-ed05-4a94-a28b-931ee870826f on localhost:31010]
	at org.apache.drill.jdbc.impl.DrillCursor.nextRowInternally(DrillCursor.java:489)
	at org.apache.drill.jdbc.impl.DrillCursor.loadInitialSchema(DrillCursor.java:561)
	at org.apache.drill.jdbc.impl.DrillResultSetImpl.execute(DrillResultSetImpl.java:1895)
	at org.apache.drill.jdbc.impl.DrillResultSetImpl.execute(DrillResultSetImpl.java:61)
	at org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:473)
	at org.apache.drill.jdbc.impl.DrillMetaImpl.prepareAndExecute(DrillMetaImpl.java:1100)
	at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:477)
	at org.apache.drill.jdbc.impl.DrillConnectionImpl.prepareAndExecuteInternal(DrillConnectionImpl.java:180)
	at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:109)
	at org.apache.calcite.avatica.AvaticaStatement.execute(AvaticaStatement.java:121)
	at org.apache.drill.jdbc.impl.DrillStatementImpl.execute(DrillStatementImpl.java:101)
	at sqlline.Commands.execute(Commands.java:841)
	at sqlline.Commands.sql(Commands.java:751)
	at sqlline.SqlLine.dispatch(SqlLine.java:746)
	at sqlline.SqlLine.begin(SqlLine.java:621)
	at sqlline.SqlLine.start(SqlLine.java:375)
	at sqlline.SqlLine.main(SqlLine.java:268)
Caused by: org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: NullPointerException


[Error Id: 977858d8-ed05-4a94-a28b-931ee870826f on localhost:31010]
	at org.apache.drill.exec.rpc.user.QueryResultHandler.resultArrived(QueryResultHandler.java:123)
	at org.apache.drill.exec.rpc.user.UserClient.handle(UserClient.java:343)
	at org.apache.drill.exec.rpc.user.UserClient.handle(UserClient.java:88)
	at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:274)
	at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:244)
	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.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
	at java.lang.Thread.run(Thread.java:748)
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)