You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Akihiko Kusanagi (JIRA)" <ji...@apache.org> on 2015/12/27 06:55:49 UTC
[jira] [Commented] (DRILL-4226)
TestExtendedTypes#checkReadWriteExtended fails when the time zone time zone
is ahead of UTC
[ https://issues.apache.org/jira/browse/DRILL-4226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15072056#comment-15072056 ]
Akihiko Kusanagi commented on DRILL-4226:
-----------------------------------------
The workaround is to add '-Duser.timezone=UTC' option to maven command:
{noformat}
mvn test -Duser.timezone=UTC
{noformat}
> TestExtendedTypes#checkReadWriteExtended fails when the time zone time zone is ahead of UTC
> -------------------------------------------------------------------------------------------
>
> Key: DRILL-4226
> URL: https://issues.apache.org/jira/browse/DRILL-4226
> Project: Apache Drill
> Issue Type: Bug
> Components: Execution - Data Types
> Affects Versions: 1.4.0
> Environment: Mac OS X 10.10.5
> Reporter: Akihiko Kusanagi
>
> Set the time zone to Asia/Tokyo on Mac OS X:
> {noformat}
> $ sudo systemsetup -gettimezone
> Time Zone: Asia/Tokyo
> {noformat}
> TestExtendedTypes#checkReadWriteExtended fails with the following output:
> {noformat}
> Running org.apache.drill.exec.vector.complex.writer.TestExtendedTypes#checkReadWriteExtended
> ...
> Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 6.17 sec <<< FAILURE! - in org.apache.drill.exec.vector.complex.writer.TestExtendedTypes
> checkReadWriteExtended(org.apache.drill.exec.vector.complex.writer.TestExtendedTypes) Time elapsed: 0.403 sec <<< FAILURE!
> org.junit.ComparisonFailure: expected:<...ateDay" : "1997-07-1[6"
> },
> "drill_timestamp" : {
> "$date" : "2009-02-23T08:00:00.000Z"
> },
> "time" : {
> "$time" : "19:20:30.450Z"
> },
> "interval" : {
> "$interval" : "PT26.400S"
> },
> "integer" : {
> "$numberLong" : 4
> },
> "inner" : {
> "bin" : {
> "$binary" : "ZHJpbGw="
> },
> "drill_date" : {
> "$dateDay" : "1997-07-16]"
> },
> "drill_...> but was:<...ateDay" : "1997-07-1[5"
> },
> "drill_timestamp" : {
> "$date" : "2009-02-23T08:00:00.000Z"
> },
> "time" : {
> "$time" : "19:20:30.450Z"
> },
> "interval" : {
> "$interval" : "PT26.400S"
> },
> "integer" : {
> "$numberLong" : 4
> },
> "inner" : {
> "bin" : {
> "$binary" : "ZHJpbGw="
> },
> "drill_date" : {
> "$dateDay" : "1997-07-15]"
> },
> "drill_...>
> at org.apache.drill.exec.vector.complex.writer.TestExtendedTypes.checkReadWriteExtended(TestExtendedTypes.java:60)
> ...
> Failed tests:
> TestDateFunctions.testToChar:139->testCommon:66 expected:<2008-[Feb]-23> but was:<2008-[2]-23>
> TestExtendedTypes.checkReadWriteExtended:60 expected:<...ateDay" : "1997-07-1[6"
> },
> "drill_timestamp" : {
> "$date" : "2009-02-23T08:00:00.000Z"
> },
> "time" : {
> "$time" : "19:20:30.450Z"
> },
> "interval" : {
> "$interval" : "PT26.400S"
> },
> "integer" : {
> "$numberLong" : 4
> },
> "inner" : {
> "bin" : {
> "$binary" : "ZHJpbGw="
> },
> "drill_date" : {
> "$dateDay" : "1997-07-16]"
> },
> "drill_...> but was:<...ateDay" : "1997-07-1[5"
> },
> "drill_timestamp" : {
> "$date" : "2009-02-23T08:00:00.000Z"
> },
> "time" : {
> "$time" : "19:20:30.450Z"
> },
> "interval" : {
> "$interval" : "PT26.400S"
> },
> "integer" : {
> "$numberLong" : 4
> },
> "inner" : {
> "bin" : {
> "$binary" : "ZHJpbGw="
> },
> "drill_date" : {
> "$dateDay" : "1997-07-15]"
> },
> "drill_...>
> {noformat}
> Test queries are like this:
> {noformat}
> ALTER SESSION SET `store.format` = 'json'
> ALTER SESSION SET `store.json.extended_types` = true
> create table dfs_test.tmp.`TestExtendedTypes/newjson` as select * from dfs.`${WORKING_PATH}/src/test/resources/vector/complex/extended.json`
> {noformat}
> It seems that Drill parses '1997-07-16' as a UTC date but writes it as a local date. If the system time zone is ahead of UTC, it will be changed to '1997-07-15'. I understand this is the current limitation, but the test code or configuration should be aware of it.
> https://drill.apache.org/docs/data-type-conversion/#time-zone-limitation
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)