drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Nadeau (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-1259) Drill changing the order of the columns when the first record has null value for the column
Date Sun, 10 Aug 2014 22:08:32 GMT

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

Jacques Nadeau commented on DRILL-1259:
---------------------------------------

A map in JSON doesn't have guaranteed order in Drill.

> Drill changing the order of the columns when the first record has null value for the
column
> -------------------------------------------------------------------------------------------
>
>                 Key: DRILL-1259
>                 URL: https://issues.apache.org/jira/browse/DRILL-1259
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - JSON
>            Reporter: Rahul Challapalli
>
> git.commit.id.abbrev=98b208e
> JSON File Used :
> {code}
> {
>   "a" : null,
>   "b" : 1
> }
> {
>   "a" : 1,
>   "b" : 1
> }
> {code}
> Query : The order has changed in the below result
> {code}
> select * from `temp.json`;
> +------------+------------+
> |     b      |     a      |
> +------------+------------+
> | 1          | null       |
> | 1          | 1          |
> +------------+------------+
> {code}
> However with the below dataset where the null field is in the second row drill preserves
the order
> {code}
> {
>   "a" : 1,
>   "b" : 1
> }
> {
>   "a" : null,
>   "b" : 1
> }
> {code}
> Query:
> {code}
> select * from `temp.json`;
> +------------+------------+
> |     a      |     b      |
> +------------+------------+
> | 1          | 1          |
> | null       | 1          |
> +------------+------------+
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message