[
https://issues.apache.org/jira/browse/DRILL-3537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chun Chang closed DRILL-3537.
-----------------------------
Assignee: Chun Chang (was: Parth Chandra)
verified fix.
{noformat}
0: jdbc:drill:schema=dfs.drillTestDirDropTabl> select * from
dfs.`/tmp/drill-3537/b.json`;
+----+
| a |
+----+
| 1 |
+----+
1 row selected (0.305 seconds)
0: jdbc:drill:schema=dfs.drillTestDirDropTabl> select * from
dfs.`/tmp/drill-3537/a.json`;
+--+
| |
+--+
+--+
No rows selected (0.268 seconds)
0: jdbc:drill:schema=dfs.drillTestDirDropTabl> select * from
dfs.`/tmp/drill-3537`;
+----+
| a |
+----+
| 1 |
+----+
{noformat}
> 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: Chun Chang
> 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)