The data:
> timcharper@timcharper:~/data $ cat test.json
> [
> {"leFloat": 1, "leInt": 1},
> {"leFloat": 0.1, "leInt": 1}
> ]
The exception:
> 0: jdbc:drill:zk=local> select leFloat from
> file.`/Users/timcharper/data/test.json`;
> Error: DATA_READ ERROR: Error parsing JSON - You tried to write a Float8 type
> when you are using a ValueWriter of type NullableBigIntWriterImpl.
>
> File /Users/timcharper/data/test.json
> Record 2
> Fragment 0:0
>
> [Error Id: e1ba7368-cbe2-401b-aa96-f01b7a8f97ae on 10.0.7.68:31010]
> (state=,code=0)
If I switch the first record and the second, then I get this:
> 0: jdbc:drill:zk=local> select leFloat from
> file.`/Users/timcharper/data/test.json`;
> Error: DATA_READ ERROR: Error parsing JSON - You tried to write a BigInt type
> when you are using a ValueWriter of type NullableFloat8WriterImpl.
>
> File /Users/timcharper/data/test.json
> Record 2
> Fragment 0:0
>
> [Error Id: 02db1336-cbe2-42e8-aaa3-9a926598295a on 10.0.7.68:31010]
> (state=,code=0)
If I set store.json.read_numbers_as_double to true, then things work, but this
is less that desirable; Is this the best solution for this problem? Anyway to
provide a type hint in the query?
Thanks!
Tim