Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E80CC200CCA for ; Wed, 19 Jul 2017 18:25:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E671B169519; Wed, 19 Jul 2017 16:25:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 37906169516 for ; Wed, 19 Jul 2017 18:25:10 +0200 (CEST) Received: (qmail 34330 invoked by uid 500); 19 Jul 2017 16:25:09 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 34319 invoked by uid 99); 19 Jul 2017 16:25:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jul 2017 16:25:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 9E7291805C0 for ; Wed, 19 Jul 2017 16:25:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Y1VFmmV6rKvG for ; Wed, 19 Jul 2017 16:25:06 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id AFE105FCC6 for ; Wed, 19 Jul 2017 16:25:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id v6JGP5hm015124; Wed, 19 Jul 2017 16:25:05 GMT Message-Id: <201707191625.v6JGP5hm015124@ip-10-146-233-104.ec2.internal> Date: Wed, 19 Jul 2017 16:25:05 +0000 From: "Matthew Jacobs (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Dan Hecht , Tim Armstrong Reply-To: mj@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5539=3A_Fix_Kudu_timestamp_with_-use_local_tz_for_unix_ts=0A?= X-Gerrit-Change-Id: I423a810427353be76aa64442044133a9a22cdc9b X-Gerrit-ChangeURL: X-Gerrit-Commit: 0411b6b1fd4d9165ed7abb0e6e83d4b636f9c828 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.7 archived-at: Wed, 19 Jul 2017 16:25:11 -0000 Matthew Jacobs has uploaded a new patch set (#6). Change subject: IMPALA-5539: Fix Kudu timestamp with -use_local_tz_for_unix_ts ...................................................................... IMPALA-5539: Fix Kudu timestamp with -use_local_tz_for_unix_ts The -use_local_tz_for_unix_timestamp_conversion 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. Tests: * Adds a custom cluster test to run Kudu test cases with -use_local_tz_for_unix_timestamp_conversion. * Adds tests for the new builtin unix_micros_to_utc_timestamp() which run in a custom cluster test (added test_local_tz_conversion.py) as well as in the regular tests (added to test_exprs.py). 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 A testdata/workloads/functional-query/queries/QueryTest/utc-timestamp-functions.test M tests/common/custom_cluster_test_suite.py M tests/custom_cluster/test_kudu.py A tests/custom_cluster/test_local_tz_conversion.py M tests/query_test/test_exprs.py M tests/query_test/test_kudu.py 15 files changed, 146 insertions(+), 16 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/11/7311/6 -- 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: 6 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Matthew Jacobs Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Matthew Jacobs Gerrit-Reviewer: Tim Armstrong