drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Phillips (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-2554) Data missing in output of select * on JSON data file, with json.all_text_mode set to true
Date Tue, 14 Apr 2015 23:23:01 GMT

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

Steven Phillips commented on DRILL-2554:
----------------------------------------

Here is a simple reproducition:

{code}

$ cat /tmp/f/a.json
{ a : null}
{ a : null}
{ a : null}
{ a : null}
{ a : [1,2,3]}

0: jdbc:drill:> select a from dfs.tmp.f;
+------------+
|     a      |
+------------+
| []         |
| []         |
| []         |
| null       |
| null       |
+------------+
5 rows selected (0.14 seconds)
0: jdbc:drill:> !q
Closing: org.apache.drill.jdbc.DrillJdbc41Factory$DrillJdbc41Connection



erwin:apache-drill-0.9.0-SNAPSHOT sphillips$ bin/submit_plan -t sql -q 'alter session set
`store.json.all_text_mode` = true; select a from dfs.tmp.f' -z localhost:2181 --format csv
Drill log directory: /var/log/drill
ok,summary
true,store.json.all_text_mode updated.
Total rows returned: 1
1 record selected (0.171000 seconds)

a
[]
[]
[]
[]
["1","2","3"]
Total rows returned: 5
5 records selected (0.154000 seconds)

{code}

You can see that it works when using submit_plan (which bypasses JDBC), but returns incorrect
result when run through sqlline (which uses JDBC).


> Data missing in output of select * on JSON data file, with json.all_text_mode set to
true
> -----------------------------------------------------------------------------------------
>
>                 Key: DRILL-2554
>                 URL: https://issues.apache.org/jira/browse/DRILL-2554
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - JDBC, Execution - Data Types
>    Affects Versions: 0.8.0
>            Reporter: Khurram Faraaz
>            Assignee: Steven Phillips
>             Fix For: 0.9.0
>
>
> Data is missing from the output of select * from JSON data file statement. Data pertaining
to key2 and key3 and key4 is missing from the output of the below select statement. I had
enabled `store.json.all_text_mode`=true for that session.
> {code}
> 0: jdbc:drill:> alter session set `store.json.all_text_mode`=true;
> +------------+------------+
> |     ok     |  summary   |
> +------------+------------+
> | true       | store.json.all_text_mode updated. |
> +------------+------------+
> 1 row selected (0.022 seconds)
> 0: jdbc:drill:> select * from `testJsnData02.json`;
> +------------+------------+------------+------------+------------+
> |    key     |    key1    |    key2    |    key3    |    key4    |
> +------------+------------+------------+------------+------------+
> | 12345      | {}         | []         | {}         | []         |
> | -123456    | {}         | []         | {}         | null       |
> | 0          | {}         | []         | {}         | null       |
> | -99999.999 | {}         | []         | {}         | null       |
> | 99999999.9876 | {}         | []         | {}         | null       |
> | Hello World! | {}         | []         | {}         | null       |
> | this is a long string, not very long though! | {}         | []         | {}       
 | null       |
> | true       | {}         | []         | {}         | null       |
> | false      | {}         | []         | {}         | null       |
> | null       | {}         | []         | {}         | null       |
> | 2147483647 | {}         | []         | {}         | null       |
> | 1100110010101010100101010101010101 | {}         | []         | {}         | null  
    |
> | 2008-1-23 14:24:23 | {}         | []         | {}         | null       |
> | 2008-2-23  | {}         | []         | {}         | null       |
> | 10:20:30.123 | {}         | null       | {}         | null       |
> | -1         | {}         | null       | {}         | null       |
> | 3.147      | {}         | null       | {}         | null       |
> | null       | {"id":"1000.997"} | null       | {}         | null       |
> | null       | {}         | null       | {}         | null       |
> | null       | {}         | null       | {}         | null       |
> | null       | {}         | null       | {}         | null       |
> | abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ    12345 aeiou | {}
        | null       | {}         | null       |
> +------------+------------+------------+------------+------------+
> 22 rows selected (0.069 seconds)
> 0: jdbc:drill:> select * from sys.version;
> +------------+----------------+-------------+-------------+------------+
> | commit_id  | commit_message | commit_time | build_email | build_time |
> +------------+----------------+-------------+-------------+------------+
> | f658a3c513ddf7f2d1b0ad7aa1f3f65049a594fe | DRILL-2209 Insert ProjectOperator with MuxExchange
| 09.03.2015 @ 01:49:18 EDT | Unknown     | 09.03.2015 @ 04:52:49 EDT |
> +------------+----------------+-------------+-------------+------------+
> 1 row selected (0.041 seconds)
> {code}
> The data that I used in my test was
> {code}
> {"key":12345}
> {"key":-123456}
> {"key":0}
> {"key":-99999.999}
> {"key":99999999.9876}
> {"key":"Hello World!"}
> {"key":"this is a long string, not very long though!"}
> {"key":true}
> {"key":false}
> {"key":null}
> {"key":2147483647}
> {"key":1100110010101010100101010101010101}
> {"key":"2008-1-23 14:24:23"}
> {"key":"2008-2-23"}
> {"key":"10:20:30.123"}
> {"key":-1}
> {"key":3.147}
> {"key1":{"id":1000.997}}
> {"key2":[1,2,3,4,-1,0,135.987,99999,-9999.876,2147483647,"test string",null,true,false]}
> {"key3":{"id":null}}
> {"key4":[null]}
> {"key":"abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ    12345 aeiou"}
> {code}



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

Mime
View raw message