drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefán Baxter (JIRA) <j...@apache.org>
Subject [jira] [Created] (DRILL-3540) Joda module not added to jackson for default serialization of DateTime objects (enhanced json)
Date Wed, 22 Jul 2015 13:50:04 GMT
Stefán Baxter created DRILL-3540:
------------------------------------

             Summary: Joda module not added to jackson for default serialization of DateTime
objects (enhanced json)
                 Key: DRILL-3540
                 URL: https://issues.apache.org/jira/browse/DRILL-3540
             Project: Apache Drill
          Issue Type: Bug
          Components: Storage - JSON
    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