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 43751200BBE for ; Fri, 11 Nov 2016 20:13:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 42107160AF6; Fri, 11 Nov 2016 19:13:00 +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 8C591160AEE for ; Fri, 11 Nov 2016 20:12:59 +0100 (CET) Received: (qmail 87095 invoked by uid 500); 11 Nov 2016 19:12:58 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 87082 invoked by uid 99); 11 Nov 2016 19:12:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Nov 2016 19:12:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 937B42C0087 for ; Fri, 11 Nov 2016 19:12:58 +0000 (UTC) Date: Fri, 11 Nov 2016 19:12:58 +0000 (UTC) From: "Kunal Khatua (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (DRILL-5034) Select timestamp from hive generated parquet always return in UTC MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 11 Nov 2016 19:13:00 -0000 [ https://issues.apache.org/jira/browse/DRILL-5034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kunal Khatua reassigned DRILL-5034: ----------------------------------- Assignee: Kunal Khatua (was: Vitalii Diravka) > Select timestamp from hive generated parquet always return in UTC > ----------------------------------------------------------------- > > Key: DRILL-5034 > URL: https://issues.apache.org/jira/browse/DRILL-5034 > Project: Apache Drill > Issue Type: Bug > Components: Storage - Parquet > Affects Versions: 1.9.0 > Reporter: Krystal > Assignee: Kunal Khatua > Fix For: 1.9.0 > > > commit id: 5cea9afa6278e21574c6a982ae5c3d82085ef904 > Reading timestamp data against a hive parquet table from drill automatically converts the timestamp data to UTC. > SELECT TIMEOFDAY() FROM (VALUES(1)); > +----------------------------------------------+ > | EXPR$0 | > +----------------------------------------------+ > | 2016-11-10 12:33:26.547 America/Los_Angeles | > +----------------------------------------------+ > data schema: > message hive_schema { > optional int32 voter_id; > optional binary name (UTF8); > optional int32 age; > optional binary registration (UTF8); > optional fixed_len_byte_array(3) contributions (DECIMAL(6,2)); > optional int32 voterzone; > optional int96 create_timestamp; > optional int32 create_date (DATE); > } > Using drill-1.8, the returned timestamps match the table data: > select convert_from(create_timestamp, 'TIMESTAMP_IMPALA') from `/user/hive/warehouse/voter_hive_parquet` limit 5; > +------------------------+ > | EXPR$0 | > +------------------------+ > | 2016-10-23 20:03:58.0 | > | null | > | 2016-09-09 12:01:18.0 | > | 2017-03-06 20:35:55.0 | > | 2017-01-20 22:32:43.0 | > +------------------------+ > 5 rows selected (1.032 seconds) > If the user timzone is changed to UTC, then the timestamp data is returned in UTC time. > Using drill-1.9, the returned timestamps got converted to UTC eventhough the user timezone is in PST. > select convert_from(create_timestamp, 'TIMESTAMP_IMPALA') from dfs.`/user/hive/warehouse/voter_hive_parquet` limit 5; > +------------------------+ > | EXPR$0 | > +------------------------+ > | 2016-10-24 03:03:58.0 | > | null | > | 2016-09-09 19:01:18.0 | > | 2017-03-07 04:35:55.0 | > | 2017-01-21 06:32:43.0 | > +------------------------+ > alter session set `store.parquet.reader.int96_as_timestamp`=true; > +-------+---------------------------------------------------+ > | ok | summary | > +-------+---------------------------------------------------+ > | true | store.parquet.reader.int96_as_timestamp updated. | > +-------+---------------------------------------------------+ > select create_timestamp from dfs.`/user/hive/warehouse/voter_hive_parquet` limit 5; > +------------------------+ > | create_timestamp | > +------------------------+ > | 2016-10-24 03:03:58.0 | > | null | > | 2016-09-09 19:01:18.0 | > | 2017-03-07 04:35:55.0 | > | 2017-01-21 06:32:43.0 | > +------------------------+ > -- This message was sent by Atlassian JIRA (v6.3.4#6332)