[ 
https://issues.apache.org/jira/browse/DRILL-3939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14959552#comment-14959552
 ] 

Jaroslaw Sosnicki commented on DRILL-3939:
------------------------------------------

$ sqlline -u jdbc:drill:zk=maprdemo:5181
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was 
removed in 8.0
apache drill 1.2.0 
"drill baby drill"
0: jdbc:drill:zk=maprdemo:5181> alter session set 
`store.json.all_text_mode`=true;
+-------+------------------------------------+
|  ok   |              summary               |
+-------+------------------------------------+
| true  | store.json.all_text_mode updated.  |
+-------+------------------------------------+
1 row selected (0.394 seconds)
0: jdbc:drill:zk=maprdemo:5181> SELECT * FROM `dfs`.`hdvm`.`./t1.json`;
Error: DATA_READ ERROR: Error parsing JSON - You tried to write a Map type when 
you are using a ValueWriter of type SingleMapWriter.

File  /mapr/demo.mapr.com/data/hcs/hdvm/t1.json
Record  1
Fragment 0:0

[Error Id: 1c936836-06ad-4ceb-b84c-77fccf384e04 on maprdemo:31010] 
(state=,code=0)
0: jdbc:drill:zk=maprdemo:5181> 
---
Yes it fails with the same error messages.

I am investigating this issue due to the fact that large JSON file I originally 
used was generated from XML using apache-camel v2.15.x and v2.16.0. I verified 
the syntax of generated JSON files and it was correct.

I assume I should be able to open any syntax validated JSON file in the DRILL.

> Drill failed to pars valid JSON object
> --------------------------------------
>
>                 Key: DRILL-3939
>                 URL: https://issues.apache.org/jira/browse/DRILL-3939
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>    Affects Versions: 1.0.0, 1.1.0, 1.2.0
>         Environment: Redhat Linux 6.7 Java 1.7 , 1.8
>            Reporter: Jaroslaw Sosnicki
>
> The following valid JSON object queried from DRILL using various clients:
> --- t.json start---
> {
>     "l1": {
>         "f1": "text1",
>         "f2": {
>             "command": "list",
>             "StorageArray": [
>                 {
>                     "array1": "Array1",
>                     "Pool": {
>                         "myPool": "PoolName"
>                     }
>                 },
>                 {
>                     "array2": "Arrays2",
>                     "Pool": [
>                         {
>                             "myPool": "PoolName1"
>                         },
>                         {
>                             "myPool": "PoolName2"
>                         }
>                     ]
>                 }
>             ]
>         }
>     }
> }
> --- t.json end ---
> Generates the following error:
> ----
> ERROR [HY000] [MapR][Drill] (1040) Drill failed to execute the query: SELECT 
> * FROM `dfs`.`hdvm`.`./t.json` LIMIT 100
> [30027]Query execution error. Details:[ 
> DATA_READ ERROR: You tried to write a Map type when you are using a 
> ValueWriter of type SingleMapWriter.
> File  /mapr/demo.mapr.com/data/hcs/hdvm/t.json
> Record  1
> Line  16
> Column  39
> Field  Pool
> Line  16
> Column  39
> Field  Pool
> Fragment 0:0
> [Error Id: 13e7a786-1135-410f-a4f0-877eab9222d6 on maprdemo:31010]
> ]----



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to