Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 20A36109B6 for ; Wed, 26 Nov 2014 22:39:35 +0000 (UTC) Received: (qmail 95295 invoked by uid 500); 26 Nov 2014 22:39:35 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 95264 invoked by uid 500); 26 Nov 2014 22:39:35 -0000 Mailing-List: contact issues-help@drill.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.incubator.apache.org Delivered-To: mailing list issues@drill.incubator.apache.org Received: (qmail 95255 invoked by uid 99); 26 Nov 2014 22:39:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Nov 2014 22:39:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 26 Nov 2014 22:39:33 +0000 Received: (qmail 94563 invoked by uid 99); 26 Nov 2014 22:39:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Nov 2014 22:39:13 +0000 Date: Wed, 26 Nov 2014 22:39:13 +0000 (UTC) From: "Hanifi Gunes (JIRA)" To: issues@drill.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-1660) JSON : selecting from an array of empty, null maps results in an exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DRILL-1660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hanifi Gunes updated DRILL-1660: -------------------------------- Attachment: (was: DRILL-1660.1.patch.txt) > JSON : selecting from an array of empty, null maps results in an exception > -------------------------------------------------------------------------- > > Key: DRILL-1660 > URL: https://issues.apache.org/jira/browse/DRILL-1660 > Project: Apache Drill > Issue Type: Bug > Components: Storage - JSON > Reporter: Rahul Challapalli > Assignee: Parth Chandra > Fix For: 0.7.0 > > Attachments: error.log > > > git.commit.id.abbrev=60aa446 > I ran the below test against the branch from Jason's github fork which has some patches for bugs related to flatten which are not yet merged into the master. > Dataset 1 : > {code} > { > "id":1, > "evnts":[ > {}, > {"key":null} > ] > } > {code} > Queries : > {code} > 0: jdbc:drill:schema=dfs.drillTestDir> select id, evnts from `json_kvgenflatten/empty-null-map.json`; > +------------+------------+ > | id | evnts | > +------------+------------+ > java.lang.IndexOutOfBoundsException: DrillBuf(ridx: 0, widx: 0, cap: 0/0, unwrapped: DrillBuf(ridx: 0, widx: 17, cap: 17/17, unwrapped: DrillBuf(ridx: 103, widx: 103, cap: 103/103, unwrapped: UnsafeDirectLittleEndian(PooledUnsafeDirectByteBuf(ridx: 0, widx: 0, cap: 103/103))))).slice(0, 8) > at io.netty.buffer.DrillBuf.(DrillBuf.java:94) > at io.netty.buffer.DrillBuf.slice(DrillBuf.java:293) > at org.apache.drill.exec.vector.UInt4Vector.load(UInt4Vector.java:179) > at org.apache.drill.exec.vector.complex.RepeatedMapVector.load(RepeatedMapVector.java:417) > at org.apache.drill.exec.record.RecordBatchLoader.load(RecordBatchLoader.java:91) > at org.apache.drill.jdbc.DrillCursor.next(DrillCursor.java:102) > at net.hydromatic.avatica.AvaticaResultSet.next(AvaticaResultSet.java:187) > at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2503) > at sqlline.SqlLine$TableOutputFormat.print(SqlLine.java:2148) > at sqlline.SqlLine.print(SqlLine.java:1809) > at sqlline.SqlLine$Commands.execute(SqlLine.java:3766) > at sqlline.SqlLine$Commands.sql(SqlLine.java:3663) > at sqlline.SqlLine.dispatch(SqlLine.java:889) > at sqlline.SqlLine.begin(SqlLine.java:763) > at sqlline.SqlLine.start(SqlLine.java:498) > at sqlline.SqlLine.main(SqlLine.java:460) > 0: jdbc:drill:schema=dfs.drillTestDir> select id, flatten(evnts) from `json_kvgenflatten/empty-null-map.json`; > +------------+------------+ > | id | EXPR$1 | > +------------+------------+ > | 1 | {} | > | 1 | {} | > +------------+------------+ > 2 rows selected (0.193 seconds) > {code} > Dataset 2: > {code} > {"id":1,"evnts":[]} > {code} > Queries : > {code} > 0: jdbc:drill:schema=dfs.drillTestDir> select id, evnts from `json_kvgenflatten/temp.json`; > +------------+------------+ > | id | evnts | > +------------+------------+ > | 1 | null | > +------------+------------+ > 1 row selected (0.12 seconds) > 0: jdbc:drill:schema=dfs.drillTestDir> select id, flatten(evnts) from `json_kvgenflatten/temp.json`; > Query failed: Failure while running fragment., org.apache.drill.exec.vector.NullableIntVector cannot be cast to org.apache.drill.exec.vector.RepeatedVector [ cb7dfdf1-1f48-4fa1-ac73-6ffbbba0e32a on qa-node191.qa.lab:31010 ] > Error: exception while executing query: Failure while executing query. (state=,code=0) > {code} > Dataset 3: > {code} > {"id":1,"evnts":[{}]} > {code} > Queries : > {code} > 0: jdbc:drill:schema=dfs.drillTestDir> select id, evnts from `json_kvgenflatten/temp1.json`; > +------------+------------+ > | id | evnts | > +------------+------------+ > java.lang.IndexOutOfBoundsException: DrillBuf(ridx: 0, widx: 0, cap: 0/0, unwrapped: DrillBuf(ridx: 0, widx: 17, cap: 17/17, unwrapped: DrillBuf(ridx: 103, widx: 103, cap: 103/103, unwrapped: UnsafeDirectLittleEndian(PooledUnsafeDirectByteBuf(ridx: 0, widx: 0, cap: 103/103))))).slice(0, 8) > at io.netty.buffer.DrillBuf.(DrillBuf.java:94) > at io.netty.buffer.DrillBuf.slice(DrillBuf.java:293) > at org.apache.drill.exec.vector.UInt4Vector.load(UInt4Vector.java:179) > at org.apache.drill.exec.vector.complex.RepeatedMapVector.load(RepeatedMapVector.java:417) > at org.apache.drill.exec.record.RecordBatchLoader.load(RecordBatchLoader.java:91) > at org.apache.drill.jdbc.DrillCursor.next(DrillCursor.java:102) > at net.hydromatic.avatica.AvaticaResultSet.next(AvaticaResultSet.java:187) > at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2503) > at sqlline.SqlLine$TableOutputFormat.print(SqlLine.java:2148) > at sqlline.SqlLine.print(SqlLine.java:1809) > at sqlline.SqlLine$Commands.execute(SqlLine.java:3766) > at sqlline.SqlLine$Commands.sql(SqlLine.java:3663) > at sqlline.SqlLine.dispatch(SqlLine.java:889) > at sqlline.SqlLine.begin(SqlLine.java:763) > at sqlline.SqlLine.start(SqlLine.java:498) > at sqlline.SqlLine.main(SqlLine.java:460) > 0: jdbc:drill:schema=dfs.drillTestDir> select id, flatten(evnts) from `json_kvgenflatten/temp1.json`; > +------------+------------+ > | id | EXPR$1 | > +------------+------------+ > | 1 | {} | > +------------+------------+ > 1 row selected (0.179 seconds) > {code} > I attached the error log for the first dataset. Let me know if you need anything else -- This message was sent by Atlassian JIRA (v6.3.4#6332)