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 14EC4187C1 for ; Fri, 15 May 2015 20:21:00 +0000 (UTC) Received: (qmail 18551 invoked by uid 500); 15 May 2015 20:21:00 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 18523 invoked by uid 500); 15 May 2015 20:21:00 -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 18510 invoked by uid 99); 15 May 2015 20:20:59 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2015 20:20:59 +0000 Date: Fri, 15 May 2015 20:20:59 +0000 (UTC) From: "Deneche A. Hakim (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-2206) Error message must be updated when querying a JSON file with arrays in first level MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-2206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14546120#comment-14546120 ] Deneche A. Hakim commented on DRILL-2206: ----------------------------------------- error message changes in 1.0.0 but it still needs to be improved: {noformat} 0: jdbc:drill:zk=local> select count(*) from dfs.data.`2206.json`; Error: DATA_READ ERROR: Error parsing JSON - Cannot read from the middle of a record. Current token was START_ARRAY File /root/data/2206.json Record 1 Fragment 0:0 [Error Id: a178c6c6-7208-4708-8786-f1db368d984a on abdel-11.qa.lab:31010] (state=,code=0) {noformat} > Error message must be updated when querying a JSON file with arrays in first level > ---------------------------------------------------------------------------------- > > Key: DRILL-2206 > URL: https://issues.apache.org/jira/browse/DRILL-2206 > Project: Apache Drill > Issue Type: Bug > Components: Storage - JSON > Reporter: Abhishek Girish > Assignee: Deneche A. Hakim > Priority: Minor > Fix For: 1.2.0 > > > Structure of the file: > {code} > [ > { > "key": "value", > ... > }, > { > ... > } > ] > {code} > *Valid Error Message:* > {code:sql} > > select * from `file.json`; > Query failed: Query stopped., Drill doesn't support objects whose first level is a scalar or array. Objects must start as maps. [ 1dc6dfc2-77ed-4a22-8ef0-e5a31c24f6fb on abhi8.qa.lab:31010 ] > Error: exception while executing query: Failure while executing query. (state=,code=0) > {code} > *Error message to be updated:* > {code:sql} > > select count(*) from `file.json`; > +------------+ > | EXPR$0 | > +------------+ > Query failed: RemoteRpcException: Failure while running fragment., You tried to do a batch data read operation when you were in a state of STOP. You can only do this type of operation when you are in a state of OK or OK_NEW_SCHEMA. [ 08135c32-fbb8-445e-8c0e-05292e6613e2 on abhi8.qa.lab:31010 ] > [ 08135c32-fbb8-445e-8c0e-05292e6613e2 on abhi8.qa.lab:31010 ] > java.lang.RuntimeException: java.sql.SQLException: Failure while executing query. > at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2514) > 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) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)