You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Paul Rogers (Jira)" <ji...@apache.org> on 2022/01/03 00:21:00 UTC

[jira] [Updated] (DRILL-8087) TestNestedDateTimeTimestamp.testNestedDateTimeCTASExtendedJson assumes time zone

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

Paul Rogers updated DRILL-8087:
-------------------------------
    Summary: TestNestedDateTimeTimestamp.testNestedDateTimeCTASExtendedJson assumes time zone  (was: {{TestNestedDateTimeTimestamp.testNestedDateTimeCTASExtendedJson}} assumes time zone)

> TestNestedDateTimeTimestamp.testNestedDateTimeCTASExtendedJson assumes time zone
> --------------------------------------------------------------------------------
>
>                 Key: DRILL-8087
>                 URL: https://issues.apache.org/jira/browse/DRILL-8087
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.19.0
>         Environment: 
>            Reporter: Paul Rogers
>            Priority: Major
>
> Drill's date types follow older SQL engines: dates and times are assumed to be in the local time zone. However, most modern applications uses UTC timestamps to avoid the issues that crop up when using local times in systems that span time zones.
> The {{TestNestedDateTimeTimestamp.testNestedDateTimeCTASExtendedJson}} unit tests seems to assume that the test runs in a particular time zone. When run on a machine in the Pacific time zone, the test fails:
> {noformat}
> java.lang.Exception: at position 0 column '`time_map`' mismatched values, expected: {"date":"1970-01-11","time":"00:00:03.600","timestamp":"2018-03-23 17:40:52.123"}(JsonStringHashMap) but received {"date":"1970-01-11","time":"00:00:03.600","timestamp":"2018-03-23 10:40:52.123"}(JsonStringHashMap)
> Expected Records near verification failure:
> Record Number: 0 { `date_list` : ["1970-01-11"],`date` : 1970-01-11,`time_list` : ["00:00:03.600"],`time_map` : {"date":"1970-01-11","time":"00:00:03.600","timestamp":"2018-03-23 17:40:52.123"},`time` : 00:00:03.600,`timestamp_list` : ["2018-03-23 17:40:52.123"],`timestamp` : 2018-03-23T17:40:52.123, }
> Actual Records near verification failure:
> Record Number: 0 { `date_list` : ["1970-01-11"],`date` : 1970-01-11,`time_list` : ["00:00:03.600"],`time_map` : {"date":"1970-01-11","time":"00:00:03.600","timestamp":"2018-03-23 10:40:52.123"},`time` : 00:00:03.600,`timestamp_list` : ["2018-03-23 10:40:52.123"],`timestamp` : 2018-03-23T10:40:52.123, }
> For query: select * from `ctas_nested_datetime_extended_json` t1 
> {noformat}
> Notice the time differences: {*}17{*}:40:52.123 (expected), {*}10{*}:40:52.123 (actual).
> Since this test causes the build to fail in my time zone, the test will be disabled in my PR. Enabled it again when the timezone issue is fixed.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)