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 B0B0E177CC for ; Mon, 29 Sep 2014 09:23:59 +0000 (UTC) Received: (qmail 67178 invoked by uid 500); 29 Sep 2014 09:23:59 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 67151 invoked by uid 500); 29 Sep 2014 09:23:59 -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 67142 invoked by uid 99); 29 Sep 2014 09:23:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2014 09:23:59 +0000 X-ASF-Spam-Status: No, hits=-2000.6 required=5.0 tests=ALL_TRUSTED,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; Mon, 29 Sep 2014 09:23:36 +0000 Received: (qmail 66546 invoked by uid 99); 29 Sep 2014 09:23:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2014 09:23:33 +0000 Date: Mon, 29 Sep 2014 09:23:33 +0000 (UTC) From: "Bhallamudi Venkata Siva Kamesh (JIRA)" To: issues@drill.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-1460) JsonReader fails when querying for elements which has more than one level nested 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-1460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14151527#comment-14151527 ] Bhallamudi Venkata Siva Kamesh commented on DRILL-1460: ------------------------------------------------------- I think, the problem does't exist when {color:green}allTextMode = true{color}. But if we don't enable this, it causes a problem. Consider the following data {noformat} "amountPer100G" : 20.75 "amountPer100G" : 20 {noformat} In the first case, json parser identifies that the token as *VALUE_NUMBER_FLOAT*, and creates NullableFloat8WriterImpl vector to store float values. But in the second case, json parser identifies that the token as *VALUE_NUMBER_INT*, and tries to store the value of type BigInt in NullableFloat8WriterImpl, which causes the problem. I think, to fix this, we can treat all the numbers as floating point numbers. > JsonReader fails when querying for elements which has more than one level nested > -------------------------------------------------------------------------------- > > Key: DRILL-1460 > URL: https://issues.apache.org/jira/browse/DRILL-1460 > Project: Apache Drill > Issue Type: Bug > Affects Versions: 0.6.0 > Reporter: Bhallamudi Venkata Siva Kamesh > > Used the following dataset : http://thecodebarbarian.wordpress.com/2014/03/28/plugging-usda-nutrition-data-into-mongodb > Executed the following query > {noformat}select t.nutrients from dfs.usda.`usda.json` t limit 1;{noformat} > and it failed with following exception > {noformat} > 2014-09-27 17:48:39,421 [b9dfbb9b-29a9-425d-801c-2e418533525f:frag:0:0] ERROR o.a.d.e.p.i.ScreenCreator$ScreenRoot - Error 0568d90a-d7df-4a5d-87e9-8b9f718dffa4: Screen received stop request sent. > java.lang.IllegalArgumentException: You tried to write a BigInt type when you are using a ValueWriter of type NullableFloat8WriterImpl. > at org.apache.drill.exec.vector.complex.impl.AbstractFieldWriter.fail(AbstractFieldWriter.java:513) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.vector.complex.impl.AbstractFieldWriter.write(AbstractFieldWriter.java:145) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.vector.complex.impl.NullableFloat8WriterImpl.write(NullableFloat8WriterImpl.java:88) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.vector.complex.fn.JsonReader.writeData(JsonReader.java:257) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.vector.complex.fn.JsonReader.writeData(JsonReader.java:310) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.vector.complex.fn.JsonReader.writeData(JsonReader.java:204) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.vector.complex.fn.JsonReader.write(JsonReader.java:134) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.vector.complex.fn.JsonReaderWithState.write(JsonReaderWithState.java:65) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.store.easy.json.JSONRecordReader2.next(JSONRecordReader2.java:111) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > {noformat} > {noformat}select t.nutrients[0].units from dfs.usda.`usda.json` t limit 1;{noformat} > and it failed with following exception > {noformat} > 2014-09-27 17:50:04,394 [9ee8a529-17fd-492f-9cba-2d1f5842eae1:frag:0:0] ERROR o.a.d.e.p.i.ScreenCreator$ScreenRoot - Error c4c6bffd-b62b-4878-af1e-58db64453307: Screen received stop request sent. > java.lang.IllegalArgumentException: You tried to write a BigInt type when you are using a ValueWriter of type NullableFloat8WriterImpl. > at org.apache.drill.exec.vector.complex.impl.AbstractFieldWriter.fail(AbstractFieldWriter.java:513) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.vector.complex.impl.AbstractFieldWriter.write(AbstractFieldWriter.java:145) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.vector.complex.impl.NullableFloat8WriterImpl.write(NullableFloat8WriterImpl.java:88) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.vector.complex.fn.JsonReader.writeData(JsonReader.java:257) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.vector.complex.fn.JsonReader.writeData(JsonReader.java:310) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.vector.complex.fn.JsonReader.writeData(JsonReader.java:204) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.vector.complex.fn.JsonReader.write(JsonReader.java:134) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.vector.complex.fn.JsonReaderWithState.write(JsonReaderWithState.java:65) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.store.easy.json.JSONRecordReader2.next(JSONRecordReader2.java:111) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > at org.apache.drill.exec.physical.impl.ScanBatch.next(ScanBatch.java:158) ~[drill-java-exec-0.6.0-incubating-SNAPSHOT-rebuffed.jar:0.6.0-incubating-SNAPSHOT] > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)