[jira] [Commented] (DRILL-1755) Add support for arrays and scalars as first level elements in JSON files

2020-03-25 Thread benj (Jira)


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

benj commented on DRILL-1755:
-

The problem appears to have been corrected in 1.17

The error shown previously appearing in 1.16 (see above) no longer appears in 
1.17 (see below) :
{code:sql}
drill-embedded 1.17> SELECT 'justfortest' AS mytext FROM dfs.tmp.`tmp.json`;
+-+
|   mytext|
+-+
| justfortest |
| justfortest |
+-+
{code}
 

> Add support for arrays and scalars as first level elements in JSON files
> 
>
> Key: DRILL-1755
> URL: https://issues.apache.org/jira/browse/DRILL-1755
> Project: Apache Drill
>  Issue Type: Improvement
>Reporter: Abhishek Girish
>Priority: Major
> Fix For: Future
>
> Attachments: drillbit.log
>
>
> Publicly available JSON data sometimes have the following structure (arrays 
> as first level elements):
> [
> {"accessLevel": "public"
> },
> {"accessLevel": "private"
> }
> ]
> Drill currently does not support Arrays or Scalars as first level elements. 
> Only maps are supported. We should add support for the arrays and scalars. 
> Log attached. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (DRILL-1755) Add support for arrays and scalars as first level elements in JSON files

2019-11-26 Thread benj (Jira)


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

benj commented on DRILL-1755:
-

This problems seems partially OK,

With a file containing the previous description {noformat}[{"accessLevel": 
"public"},{"accessLevel": "private"}]{noformat}

{code:sql}
apache drill (1.16)> SELECT *, 'justfortest' AS mytext FROM 
dfs.tmp.`example.json`;
+-+-+
| accessLevel |   mytext|
+-+-+
| public  | justfortest |
| private | justfortest |
+-+-+
2 rows selected (0.127 seconds)
{code}

But some problems subsists, like

{code:sql}
apache drill (1.16)> SELECT 'justfortest' As mytext FROM dfs.tmp.`example.json`;
Error: DATA_READ ERROR: Error parsing JSON - Cannot read from the middle of a 
record. Current token was START_ARRAY 

File  /tmp/example.json
Record  1
Column  2
Fragment 0:0
{code}




> Add support for arrays and scalars as first level elements in JSON files
> 
>
> Key: DRILL-1755
> URL: https://issues.apache.org/jira/browse/DRILL-1755
> Project: Apache Drill
>  Issue Type: Improvement
>Reporter: Abhishek Girish
>Priority: Major
> Fix For: Future
>
> Attachments: drillbit.log
>
>
> Publicly available JSON data sometimes have the following structure (arrays 
> as first level elements):
> [
> {"accessLevel": "public"
> },
> {"accessLevel": "private"
> }
> ]
> Drill currently does not support Arrays or Scalars as first level elements. 
> Only maps are supported. We should add support for the arrays and scalars. 
> Log attached. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)