[
https://issues.apache.org/jira/browse/DRILL-3537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sean Hsuan-Yi Chu updated DRILL-3537:
-------------------------------------
Assignee: Parth Chandra (was: Sean Hsuan-Yi Chu)
> Empty Json file can potentially result into wrong results
> ----------------------------------------------------------
>
> Key: DRILL-3537
> URL: https://issues.apache.org/jira/browse/DRILL-3537
> Project: Apache Drill
> Issue Type: Bug
> Components: Execution - Relational Operators, Storage - JSON
> Reporter: Sean Hsuan-Yi Chu
> Assignee: Parth Chandra
> Priority: Critical
> Fix For: 1.2.0
>
>
> In the directory, we have two files. One has some data and the other one is
> empty. A query as below:
> {code}
> select * from dfs.`directory`;
> {code}
> will produce different results according to the order of the files being read
> (The default order is in the alphabetic order of the filenames). To give a
> more concrete example, the non-empty json has data:
> {code}
> {
> a:1
> }
> {code}
> By naming the files, you can control the orders. If the empty file is read in
> firstly, the result is
> {code}
> +-------+----+
> | * | a |
> +-------+----+
> | null | 1 |
> +-------+----+
> {code}
> If the opposite order takes place, the result is
> {code}
> +----+
> | a |
> +----+
> | 1 |
> | 2 |
> +----+
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)