From dev-return-1930-archive-asf-public=cust-asf.ponee.io@orc.apache.org Sat Mar 17 13:59:47 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 63FD1180652 for ; Sat, 17 Mar 2018 13:59:46 +0100 (CET) Received: (qmail 55219 invoked by uid 500); 17 Mar 2018 12:59:40 -0000 Mailing-List: contact dev-help@orc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@orc.apache.org Delivered-To: mailing list dev@orc.apache.org Received: (qmail 55196 invoked by uid 99); 17 Mar 2018 12:59:39 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Mar 2018 12:59:39 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C27FFF3547; Sat, 17 Mar 2018 12:59:39 +0000 (UTC) From: wgtmac To: dev@orc.apache.org Reply-To: dev@orc.apache.org References: In-Reply-To: Subject: [GitHub] orc pull request #233: ORC-322: [C++] Fix writing & reading timestamp Content-Type: text/plain Message-Id: <20180317125939.C27FFF3547@git1-us-west.apache.org> Date: Sat, 17 Mar 2018 12:59:39 +0000 (UTC) Github user wgtmac commented on a diff in the pull request: https://github.com/apache/orc/pull/233#discussion_r175257368 --- Diff: c++/src/ColumnWriter.cc --- @@ -1194,12 +1194,11 @@ namespace orc { bool hasNull = false; for (uint64_t i = 0; i < numValues; ++i) { if (notNull == nullptr || notNull[i]) { - // TimestampVectorBatch already stores data in UTC - int64_t millsUTC = secs[i] * 1000 + nanos[i] / 1000000; + int64_t millsUTC = + (secs[i] + timezone.getVariant(secs[i]).gmtOffset) * 1000 + nanos[i] / 1000000; --- End diff -- You can check TimestampTreeWriter.java:113. Without this line, we will see inconsistency with java code. ---