You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Rahul Challapalli (JIRA)" <ji...@apache.org> on 2015/04/24 02:52:38 UTC

[jira] [Commented] (DRILL-2868) Drill returning incorrect data when we have fields missing in some of the files

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

Rahul Challapalli commented on DRILL-2868:
------------------------------------------

I created parquet files using CTAS from the above json files. With parquet files the below query works as expected 
{code}
select t.m1.m2.m3 from `parquet_repro` as `t`;
+------------+
|   EXPR$0   |
+------------+
| null       |
| null       |
| null       |
| null       |
| null       |
| null       |
| {"c2":5}   |
| {"c2":6}   |
| {}         |
+------------+
9 rows selected (0.163 seconds)
{code}

> Drill returning incorrect data when we have fields missing in some of the files
> -------------------------------------------------------------------------------
>
>                 Key: DRILL-2868
>                 URL: https://issues.apache.org/jira/browse/DRILL-2868
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Relational Operators, Storage - JSON, Storage - Parquet
>            Reporter: Rahul Challapalli
>            Assignee: Hanifi Gunes
>            Priority: Critical
>
> git.commit.id.abbrev=5cd36c5
> Data File1 : a.json
> {code}
> { "c1" : 1, "m1" : {"m2" : {"m3" : {"c2" : 5} } } }
> { "c1" : 2, "m1" : {"m2" : {"m3" : {"c2" : 6} } } }
> { "c1" : 3, "m1" : {"m2" : {"c2" : 5} } }
> {code}
> Data File2 : b.json
> {code}
> { "c1" : 3, "m1" : {"m2" : {"c2" : 5} } }
> { "c1" : 3, "m1" : {"m2" : {"c2" : 5} } }
> { "c1" : 3, "m1" : {"m2" : {"c2" : 5} } }
> {code}
> Data File3 : c.json
> {code}
> { "c1" : 3, "m1" : {"m2" : {"c2" : 5} } }
> { "c1" : 3, "m1" : {"m2" : {"c2" : 5} } }
> { "c1" : 3, "m1" : {"m2" : {"c2" : 5} } }
> {code}
> The below query reports incorrect data :
> {code}
> select t.m1.m2.m3 from `delme_repro` as `t`;
> +------------+
> |   EXPR$0   |
> +------------+
> | null       |
> | null       |
> | null       |
> | null       |
> | null       |
> | null       |
> | null       |
> | null       |
> | null       |
> +------------+
> 9 rows selected (0.139 seconds)
> {code}
> However if I run the same query on the specific file, I get the correct output
> {code}
> select t.m1.m2.m3 from `delme_repro/a.json` as `t`;
> +------------+
> |   EXPR$0   |
> +------------+
> | {"c2":5}   |
> | {"c2":6}   |
> | {}         |
> +------------+
> 3 rows selected (0.113 seconds)
> {code}
> It looks like the file size plays a part in deciding the order in which Drill reads the files. But there could be more to this than just the order because when I made sure that 'b.json' and 'c.json' only had one records, drill correctly reported the data.
> Let me know if you have any questions



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