Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EA999200B88 for ; Wed, 7 Sep 2016 14:38:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E9625160AA3; Wed, 7 Sep 2016 12:38:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 39E9F160AC1 for ; Wed, 7 Sep 2016 14:38:23 +0200 (CEST) Received: (qmail 93401 invoked by uid 500); 7 Sep 2016 12:38:22 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 93179 invoked by uid 99); 7 Sep 2016 12:38:22 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2016 12:38:22 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id CD12B2C1B81 for ; Wed, 7 Sep 2016 12:38:21 +0000 (UTC) Date: Wed, 7 Sep 2016 12:38:21 +0000 (UTC) From: "Khurram Faraaz (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-3762) NPE : Query nested JSON data MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 07 Sep 2016 12:38:24 -0000 [ https://issues.apache.org/jira/browse/DRILL-3762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15470502#comment-15470502 ] Khurram Faraaz commented on DRILL-3762: --------------------------------------- Can be reproduced on Drill 1.9.0 {noformat} 0: jdbc:drill:schema=dfs.tmp> select t.meta.view.columns[1] from `repro_data.json` t; Error: Unexpected RuntimeException: java.lang.NullPointerException (state=,code=0) {noformat} > NPE : Query nested JSON data > ---------------------------- > > Key: DRILL-3762 > URL: https://issues.apache.org/jira/browse/DRILL-3762 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC > Affects Versions: 1.2.0 > Environment: 4 node cluster CentOS > Reporter: Khurram Faraaz > Fix For: Future > > > Drill master commit ID : 0686bc23 > I am seeing an NPE when I try to query nested data. Interestingly there are no Exceptions written to either drillbit.log or drillbit.out, I had to set verbose mode to ON, on sqlline to see the stack trace. > {code} > 0: jdbc:drill:schema=dfs.tmp> select * from `repro_data.json`; > +---------------------------------------------------------------------+ > | meta | > +---------------------------------------------------------------------+ > | {"view":{"columns":[{"cachedCounts":{"smallest":"hello world"}}]}} | > +---------------------------------------------------------------------+ > 1 row selected (2.401 seconds) > 0: jdbc:drill:schema=dfs.tmp> select t.meta.view.columns from `repro_data.json` t; > +------------------------------------------------+ > | EXPR$0 | > +------------------------------------------------+ > | [{"cachedCounts":{"smallest":"hello world"}}] | > +------------------------------------------------+ > 1 row selected (0.347 seconds) > 0: jdbc:drill:schema=dfs.tmp> select t.meta.view.columns[1] from `repro_data.json` t; > Error: Unexpected RuntimeException: java.lang.NullPointerException (state=,code=0) > 0: jdbc:drill:schema=dfs.tmp> !verbose true > verbose: on > 0: jdbc:drill:schema=dfs.tmp> select t.meta.view.columns[1] from `repro_data.json` t; > 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: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:738) > at sqlline.SqlLine.begin(SqlLine.java:612) > at sqlline.SqlLine.start(SqlLine.java:366) > at sqlline.SqlLine.main(SqlLine.java:259) > Caused by: java.lang.NullPointerException > at org.apache.drill.exec.record.RecordBatchLoader.load(RecordBatchLoader.java:99) > at org.apache.drill.jdbc.impl.DrillCursor.nextRowInternally(DrillCursor.java:223) > ... 14 more > {code} > Data used in the test, repo_data.json > {code} > { > "meta":{ > "view":{ > "columns":[{"cachedCounts":{ "smallest":"hello world"}}] > } > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)