Return-Path: X-Original-To: apmail-drill-dev-archive@www.apache.org Delivered-To: apmail-drill-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1752117537 for ; Mon, 1 Jun 2015 19:40:28 +0000 (UTC) Received: (qmail 77631 invoked by uid 500); 1 Jun 2015 19:40:27 -0000 Delivered-To: apmail-drill-dev-archive@drill.apache.org Received: (qmail 77581 invoked by uid 500); 1 Jun 2015 19:40:27 -0000 Mailing-List: contact dev-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 dev@drill.apache.org Received: (qmail 77568 invoked by uid 99); 1 Jun 2015 19:40:27 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2015 19:40:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 1F2A1C0DFB for ; Mon, 1 Jun 2015 19:40:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3 X-Spam-Level: *** X-Spam-Status: No, score=3 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, WEIRD_PORT=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id dzAc0Aaev1ro for ; Mon, 1 Jun 2015 19:40:21 +0000 (UTC) Received: from mail-ie0-f172.google.com (mail-ie0-f172.google.com [209.85.223.172]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 7360623131 for ; Mon, 1 Jun 2015 19:40:20 +0000 (UTC) Received: by ieclw1 with SMTP id lw1so21870770iec.3 for ; Mon, 01 Jun 2015 12:40:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=XIZxaHoGBnTVFV4m5gt24XHbcfPwV5Uve+IamBe9U9A=; b=U5L9Wkb2+RIEBtNYx1c80HeShoO7lmPwevJ5ZjWnSCklV2v4bmn8PHQQjuXvVmGaHw L6SRTtqHGRUoopoBp8IxE1x6eGmWcBF3suiS+ccIWgOK3k4lmCiHSGdd4Nsl15Qib1MH HnR1mbT0cMd/vWEVc5PPOimSaFik/GOE7CfCUebrVHbCBVzwD1ZCrPQQ/NEdJfgLP+5c EVAeup3AP1vcmeCe7LMRcfivt9qiFHSF9Xg3yHPjaHbgG6RfScXWi1lHEN66tbWQxZB6 +2kxcVzjZOB7amKlhyXCvag1KqXxqfMTW4HwxU740uUs5Zq0WVTDiZg/CTbQaWjhS2Ue c74Q== X-Gm-Message-State: ALoCoQn6Av2shHFfKqAr5v/MMK87OqOiAf0APFoTr2FbWGtT3eBG1cikLW7DqMZp603d0Dcs4Vs8 MIME-Version: 1.0 X-Received: by 10.50.138.70 with SMTP id qo6mr15447680igb.15.1433187619385; Mon, 01 Jun 2015 12:40:19 -0700 (PDT) Received: by 10.64.163.3 with HTTP; Mon, 1 Jun 2015 12:40:19 -0700 (PDT) In-Reply-To: References: Date: Mon, 1 Jun 2015 12:40:19 -0700 Message-ID: Subject: Re: known issue? Problem reading JSON From: Hanifi Gunes To: dev@drill.apache.org Content-Type: multipart/alternative; boundary=001a1134bbc6f34b80051779fe68 --001a1134bbc6f34b80051779fe68 Content-Type: text/plain; charset=UTF-8 * The former query(select) does read and vectorize every single field/column, thus field type matters whereas the latter(count) does not really read at field level but simply counts individual JSON records thereby very efficient in time (~90x in a single very wide record) and memory. On Mon, Jun 1, 2015 at 12:38 PM, Hanifi Gunes wrote: > The fact that count does not fail but select fails is known and will be > there at least until we support heterogenous types. Also we handle these > queries differently at JSON processor. The former query does read and > vectorize every single field/column, thus field type matters whereas the > latter does not really read at field level but simply counts individual > JSON records thereby very efficient in time (~90x in a single very wide > record) and memory. That's the reason why your count(*) query succeeds > while select(*) fails. > > I agree that error messages need a touch. Filed DRILL-3231 to track this. > > > On Sat, May 30, 2015 at 10:51 PM, Ted Dunning > wrote: > >> OK. >> >> But this *is* in a data file that we distribute as part of Drill. >> >> Perhaps a better error message is warranted? >> >> Also, this seems to be a serious limitation that appears only to be >> fixable >> using a sledge-hammer. >> >> >> >> On Sun, May 31, 2015 at 3:31 AM, Jacques Nadeau >> wrote: >> >> > The second error is stating that you have a column that is a string in >> one >> > row and a double in another. >> > >> > On Sat, May 30, 2015 at 3:16 PM, Ted Dunning >> > wrote: >> > >> > > This seems wrong. I can count the records in a JSON table, but >> select * >> > > doesn't work. >> > > >> > > Is this a known issue? >> > > >> > > >> > > >> > > ted:apache-drill-1.0.0$ bin/drill-embedded >> > > Java HotSpot(TM) 64-Bit Server VM warning: ignoring option >> > > MaxPermSize=512M; support was removed in 8.0 >> > > May 31, 2015 12:14:52 AM >> org.glassfish.jersey.server.ApplicationHandler >> > > initialize >> > > INFO: Initiating Jersey application, version Jersey: 2.8 2014-04-29 >> > > 01:25:26... >> > > apache drill 1.0.0 >> > > "got drill?" >> > > 0: jdbc:drill:zk=local> *select count(*) from >> > > cp.`sales_fact_1997_collapsed.json` ;* >> > > +---------+ >> > > | EXPR$0 | >> > > +---------+ >> > > | 86837 | >> > > +---------+ >> > > 1 row selected (1.316 seconds) >> > > 0: jdbc:drill:zk=local> *select * from >> > cp.`sales_fact_1997_collapsed.json` >> > > limit 3;* >> > > Error: DATA_READ ERROR: Error parsing JSON - You tried to write a >> BigInt >> > > type when you are using a ValueWriter of type >> NullableFloat8WriterImpl. >> > > >> > > File /sales_fact_1997_collapsed.json >> > > Record 3 >> > > Fragment 0:0 >> > > >> > > [Error Id: 8a9ac2c1-9764-42fd-bdeb-ec0b5e408438 on 192.168.1.38:31010 >> ] >> > > (state=,code=0) >> > > 0: jdbc:drill:zk=local> *ALTER SYSTEM SET >> > > `store.json.read_numbers_as_double` = true;* >> > > +-------+---------------------------------------------+ >> > > | ok | summary | >> > > +-------+---------------------------------------------+ >> > > | true | store.json.read_numbers_as_double updated. | >> > > +-------+---------------------------------------------+ >> > > 1 row selected (0.086 seconds) >> > > 0: jdbc:drill:zk=local> *select * from >> > cp.`sales_fact_1997_collapsed.json` >> > > limit 3;* >> > > Error: DATA_READ ERROR: Error parsing JSON - You tried to write a >> VarChar >> > > type when you are using a ValueWriter of type >> NullableFloat8WriterImpl. >> > > >> > > File /sales_fact_1997_collapsed.json >> > > Record 47 >> > > Fragment 0:0 >> > > >> > >> > > --001a1134bbc6f34b80051779fe68--