You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Parth Chandra (JIRA)" <ji...@apache.org> on 2015/04/21 22:01:58 UTC
[jira] [Updated] (DRILL-1151) JSON nested data returns empty for
all rows except the first when using selections
[ https://issues.apache.org/jira/browse/DRILL-1151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Parth Chandra updated DRILL-1151:
---------------------------------
Component/s: Storage - JSON
> JSON nested data returns empty for all rows except the first when using selections
> ----------------------------------------------------------------------------------
>
> Key: DRILL-1151
> URL: https://issues.apache.org/jira/browse/DRILL-1151
> Project: Apache Drill
> Issue Type: Bug
> Components: Storage - JSON
> Reporter: Norris Lee
> Assignee: Jacques Nadeau
> Priority: Critical
> Fix For: 0.4.0
>
> Attachments: DRILL-1151.patch
>
>
> Without the limit clause, everything gets returned:
> {code}
> 0: jdbc:drill:zk=localhost:5181> SELECT * FROM `dfs`.`optdrill`.`./raw-files/donuts/moredonuts.json`;
> +------------+------------+------------+------------+------------+------------+------------+------------+
> | id | type | name | ppu | sales | batters | topping | filling |
> +------------+------------+------------+------------+------------+------------+------------+------------+
> | 0001 | donut | Cake | 0.55 | 35 | {"batter":[{"id":"1001","type":"Regular"},{"id":"1002","type":"Chocolate"},{"id":"100 |
> | 0002 | donut | Raised | 0.69 | 145 | {"batter":[{"id":"1001","type":"Regular"}]} | [{"id":"5001","type":"None"},{"id":"500 |
> | 0003 | donut | Old Fashioned | 0.55 | 300 | {"batter":[{"id":"1001","type":"Regular"},{"id":"1002","type":"Chocolate"}]} | [{" |
> | 0004 | donut | Filled | 0.69 | 14 | {"batter":[{"id":"1001","type":"Regular"},{"id":"1002","type":"Chocolate"},{"id":"100 |
> | 0005 | donut | Apple Fritter | 1.0 | 700 | {"batter":[{"id":"1001","type":"Regular"}]} | [{"id":"5002","type":"Glazed"}] | [] |
> +------------+------------+------------+------------+------------+------------+------------+------------+
> 5 rows selected (0.785 seconds)
> {code}
> Using the limit clause, the batters column returns [] for rows 2-5:
> {code}
> dbc:drill:zk=localhost:5181> SELECT * FROM `dfs`.`optdrill`.`./raw-files/donuts/moredonuts.json` LIMIT 100;
> +------------+------------+------------+------------+------------+------------+------------+------------+
> | id | type | name | ppu | sales | batters | topping | filling |
> +------------+------------+------------+------------+------------+------------+------------+------------+
> | 0001 | donut | Cake | 0.55 | 35 | {"batter":[{"id":"1001","type":"Regular"},{"id":"1002","type":"Chocolate"},{"id":"100 |
> | 0002 | donut | Raised | 0.69 | 145 | {"batter":[]} | [] | [] |
> | 0003 | donut | Old Fashioned | 0.55 | 300 | {"batter":[]} | [] | [] |
> | 0004 | donut | Filled | 0.69 | 14 | {"batter":[]} | [] | [] |
> | 0005 | donut | Apple Fritter | 1.0 | 700 | {"batter":[]} | [] | [] |
> +------------+------------+------------+------------+------------+------------+------------+------------+
> 5 rows selected (0.543 seconds)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)