Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/9986 )
Change subject: IMPALA-3307: Add support for IANA time-zone db ...................................................................... Patch Set 5: (1 comment) http://gerrit.cloudera.org:8080/#/c/9986/5/be/src/runtime/timestamp-value.cc File be/src/runtime/timestamp-value.cc: http://gerrit.cloudera.org:8080/#/c/9986/5/be/src/runtime/timestamp-value.cc@139 PS5, Line 139: // In case the resulting 'time_point' is ambiguous, we have to invalidate : // TimestampValue. : // 'civil_lookup' members and the details of handling ambiguity are described at: : // https://github.com/google/cctz/blob/a2dd3d0fbc811fe0a1d4d2dbb0341f1a3d28cb2a/ : // include/cctz/time_zone.h#L106 : if (UNLIKELY(from_cl.kind != cctz::time_zone::civil_lookup::UNIQUE) I have investigated a bit about this: - there is a Jira that complains about this behavior: https://issues.apache.org/jira/browse/IMPALA-3169 - Hive does not work like this, it returns a "valid" timestamp for repeated/skipped hours: select to_utc_timestamp(cast("2011-03-13 02:15:00" as timestamp), "America/Los_Angeles"), to_utc_timestamp(cast("2011-11-06 01:15:00" as timestamp), "America/Los_Angeles") result: 2011-03-13 10:15:00.0 2011-11-06 09:15:00.0 I think that we should do the same, at least for repeated values. I can imagine several valid queries where this would be the correct behavior, for example when we filter for a time interval. So I vote for solving IMPALA-3169 in this patch by choosing pre or post time in non UNIQUE cases too. If there are no test cases yet for skipped/repeated hours, then we should create some and expect the same results that Hive returns. -- To view, visit http://gerrit.cloudera.org:8080/9986 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I93c1fbffe81f067919706e30db0a34d0e58e7e77 Gerrit-Change-Number: 9986 Gerrit-PatchSet: 5 Gerrit-Owner: Attila Jeges <atti...@cloudera.com> Gerrit-Reviewer: Attila Jeges <atti...@cloudera.com> Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com> Gerrit-Reviewer: Gabor Kaszab <gaborkas...@cloudera.com> Gerrit-Reviewer: Zoltan Borok-Nagy <borokna...@cloudera.com> Gerrit-Comment-Date: Fri, 11 May 2018 14:04:02 +0000 Gerrit-HasComments: Yes