drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jinfeng Ni <...@apache.org>
Subject Re: known issue? Problem reading JSON
Date Sat, 30 May 2015 23:33:28 GMT
The first error implies at least one column of your JSON data have mixed
integer values and float values. The second error seems implies the column
has mixed string and float values.

You may try with this option :

ALTER session set `store.json.all_text_mode` = true;



On Sat, May 30, 2015 at 3:16 PM, Ted Dunning <ted.dunning@gmail.com> 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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message