impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Jacobs (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-5539: Kudu timestamp scans wrong with -use local tz for unix ts
Date Wed, 12 Jul 2017 01:03:02 GMT
Matthew Jacobs has uploaded a new patch set (#2).

Change subject: IMPALA-5539: Kudu timestamp scans wrong with -use_local_tz_for_unix_ts
......................................................................

IMPALA-5539: Kudu timestamp scans wrong with -use_local_tz_for_unix_ts

The -use_local_tz_for_unix_ts flag exists to specify if
TIMESTAMPs should be interpreted as localtime or UTC when
converting to/from Unix time via builtins:
  from_unixtime(bigint unixtime)
  unix_timestamp(string datetime[, ...])
  unix_timestamp(timestamp datetime)

However, the KuduScanner was calling into code that, when the
gflag above was set, interpreted Unix times as local time.
Unfortunately the write path (KuduTableSink) and some FE
TIMESTAMP code (see KuduUtil.java) did not have this
behavior, i.e. we were handling the gflag inconsistently.

While an argument could be made for converting to/from local
time in all places, the simpler approach is to treat
everything as UTC consistently.

Change-Id: I423a810427353be76aa64442044133a9a22cdc9b
---
M be/src/exec/kudu-scanner.cc
M be/src/exprs/timestamp-functions-ir.cc
M be/src/exprs/timestamp-functions.h
M be/src/runtime/timestamp-value.cc
M be/src/runtime/timestamp-value.h
M be/src/runtime/timestamp-value.inline.h
M common/function-registry/impala_functions.py
M fe/src/main/java/org/apache/impala/catalog/KuduColumn.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java
M tests/custom_cluster/test_kudu.py
M tests/query_test/test_kudu.py
11 files changed, 34 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/11/7311/2
-- 
To view, visit http://gerrit.cloudera.org:8080/7311
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I423a810427353be76aa64442044133a9a22cdc9b
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj@cloudera.com>

Mime
View raw message