drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Khurram Faraaz (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-4873) Select from an array of empty maps results in NPE
Date Fri, 02 Sep 2016 20:15:20 GMT
Khurram Faraaz created DRILL-4873:
-------------------------------------

             Summary: Select from an array of empty maps results in NPE
                 Key: DRILL-4873
                 URL: https://issues.apache.org/jira/browse/DRILL-4873
             Project: Apache Drill
          Issue Type: Bug
          Components: Execution - Flow
    Affects Versions: 1.9.0
            Reporter: Khurram Faraaz


Select map from an array of empty maps results in NPE
Drill 1.9.0 git commit ID: 28d315bb

{noformat}
0: jdbc:drill:schema=dfs.tmp> select arr from `repeat_in_arry.json`;
+-------------------------+
|           arr           |
+-------------------------+
| [{},{},{},{},{},{},{}]  |
+-------------------------+
1 row selected (0.385 seconds)
{noformat}

Data used in test contains a single array of empty maps.
{noformat}
[root@centos-01 ~]# cat repeat_in_arry.json
{"arr":[{},{},{},{},{},{},{}]}
{noformat}

{noformat}
0: jdbc:drill:schema=dfs.tmp> select arr[1] from `repeat_in_arry.json`;
Error: Unexpected RuntimeException: java.lang.NullPointerException (state=,code=0)
{noformat}

Stack trace 
{noformat}
0: jdbc:drill:schema=dfs.tmp> select arr[1] from `repeat_in_arry.json`;
Error: Unexpected RuntimeException: java.lang.NullPointerException (state=,code=0)
java.sql.SQLException: Unexpected RuntimeException: java.lang.NullPointerException
	at org.apache.drill.jdbc.impl.DrillCursor.nextRowInternally(DrillCursor.java:261)
	at org.apache.drill.jdbc.impl.DrillCursor.loadInitialSchema(DrillCursor.java:290)
	at org.apache.drill.jdbc.impl.DrillResultSetImpl.execute(DrillResultSetImpl.java:1933)
	at org.apache.drill.jdbc.impl.DrillResultSetImpl.execute(DrillResultSetImpl.java:73)
	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: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: java.lang.NullPointerException
	at org.apache.drill.exec.record.RecordBatchLoader.load(RecordBatchLoader.java:117)
	at org.apache.drill.jdbc.impl.DrillCursor.nextRowInternally(DrillCursor.java:223)
	... 14 more
{noformat}	



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

Mime
View raw message