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] [Updated] (DRILL-3540) SQLline calls toString to convert complex columns into JSON. This translation doesn't work for some types
Date Wed, 22 Jul 2015 22:52:05 GMT

     [ https://issues.apache.org/jira/browse/DRILL-3540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jacques Nadeau updated DRILL-3540:
----------------------------------
    Component/s:     (was: Storage - JSON)
                 Client - JDBC

> SQLline calls toString to convert complex columns into JSON.  This translation doesn't
work for some types
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-3540
>                 URL: https://issues.apache.org/jira/browse/DRILL-3540
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - JDBC
>    Affects Versions: 1.1.0
>            Reporter: Stefán Baxter
>            Assignee: Steven Phillips
>
> test-datetime.json
> {
>   "occurred_at" : {
>     "$date" : "2015-04-01T00:14:02.309Z"
>   },
>   "sub":{
>     "occurred_at":{"$date":"2015-04-01T00:14:02.309Z"}
>   }
> }
> correctly results in this (without timezone though):
>  select t.occurred_at, t.sub.occurred_at from dfs.tmp.`/test-datetime.json` as t;
> +--------------------------+--------------------------+
> |       occurred_at        |          EXPR$1          |
> +--------------------------+--------------------------+
> | 2015-04-01 00:14:02.309  | 2015-04-01 00:14:02.309  |
> +--------------------------+--------------------------+
> 1 row selected (0.067 seconds)
> here we select the substructure, not the field
> select t.occurred_at, t.sub from dfs.tmp.`/test-datetime.json` as t;
> incorrectly results in this:
> +-------------+-----+
> | occurred_at | sub |
> +-------------+-----+
> | 2015-04-01 00:14:02.309 | {"occurred_at":{"year":2015,"dayOfMonth":1,"dayOfWeek":3,"era":1,"dayOfYear":91,"weekyear":2015,"weekOfWeekyear":14,"monthOfYear":4,"yearOfEra":2015,"yearOfCentury":15,"centuryOfEra":20,"millisOfSecond":309,"millisOfDay":842309,"secondOfMinute":2,"secondOfDay":842,"minuteOfHour":14,"minuteOfDay":14,"hourOfDay":0,"millis":1427847242309,"zone":{"fixed":false,"uncachedZone":{"cachable":true,"fixed":false,"id":"Atlantic/Reykjavik"},"id":"Atlantic/Reykjavik"},"chronology":{"zone":{"fixed":false,"uncachedZone":{"cachable":true,"fixed":false,"id":"Atlantic/Reykjavik"},"id":"Atlantic/Reykjavik"}},"afterNow":false,"beforeNow":true,"equalNow":false}}
|
> +-------------+-----+
> 1 row selected (0.066 seconds)



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

Mime
View raw message