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 5815E200C15 for ; Wed, 8 Feb 2017 14:18:57 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 56AE3160B5A; Wed, 8 Feb 2017 13:18:57 +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 9BD84160B4E for ; Wed, 8 Feb 2017 14:18:56 +0100 (CET) Received: (qmail 7568 invoked by uid 500); 8 Feb 2017 13:18:55 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 7559 invoked by uid 99); 8 Feb 2017 13:18:55 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2017 13:18:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5D6521A0316 for ; Wed, 8 Feb 2017 13:18:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id QFiUrvs4lIxr for ; Wed, 8 Feb 2017 13:18:53 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 0C7C95FC3D for ; Wed, 8 Feb 2017 13:18:53 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 18569E0156 for ; Wed, 8 Feb 2017 13:18:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id C55F324D2F for ; Wed, 8 Feb 2017 13:18:41 +0000 (UTC) Date: Wed, 8 Feb 2017 13:18:41 +0000 (UTC) From: "Jesus Camacho Rodriguez (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-15850) Proper handling of timezone in Druid storage handler MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 08 Feb 2017 13:18:57 -0000 [ https://issues.apache.org/jira/browse/HIVE-15850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-15850: ------------------------------------------- Description: We need to make sure that filters on timestamp are represented with timezone when we go into Calcite and converting them again when we go back from Calcite to Hive. That would help us to 1) push the correct filters to Druid, and 2) if filters are not pushed at all (they remain in the Calcite plan), they will be correctly represented in Hive. I have checked and AFAIK this is currently done correctly (ASTBuilder.java, ExprNodeConverter.java, and RexNodeConverter.java). Secondly, we need to make sure we read/write timestamp data correctly from/to Druid. - When we write timestamp to Druid, we should include the timezone, which would allow Druid to handle them properly. We do that already. - When we read timestamp from Druid, we should transform the timestamp to be based on Hive timezone. This will give us a consistent behavior of Druid-on-Hive vs Hive-standalone, since timestamp in Hive is represented to the user using Hive client timezone. Currently we do not do that. was: We need to make sure that filters on timestamp are represented with timezone when we go into Calcite and converting them again when we go back from Calcite to Hive. That would help us to 1) push the correct filters to Druid, and 2) if filters are not pushed at all (they remain in the Calcite plan), they will be correctly represented in Hive. Secondly, we need to make sure we read/write timestamp data correctly from/to Druid. - When we write timestamp to Druid, we should include the timezone, which would allow Druid to handle them properly. AFAIK, we do that already. - When we read timestamp from Druid, we should transform the timestamp to be based on Hive timezone. This will give us a consistent behavior of Druid-on-Hive vs Hive-standalone, since timestamp in Hive is represented to the user using Hive client timezone. AFAIK, currently we do not do that. > Proper handling of timezone in Druid storage handler > ---------------------------------------------------- > > Key: HIVE-15850 > URL: https://issues.apache.org/jira/browse/HIVE-15850 > Project: Hive > Issue Type: Bug > Components: Druid integration > Affects Versions: 2.2.0 > Reporter: Jesus Camacho Rodriguez > Assignee: Jesus Camacho Rodriguez > Priority: Critical > > We need to make sure that filters on timestamp are represented with timezone when we go into Calcite and converting them again when we go back from Calcite to Hive. That would help us to 1) push the correct filters to Druid, and 2) if filters are not pushed at all (they remain in the Calcite plan), they will be correctly represented in Hive. I have checked and AFAIK this is currently done correctly (ASTBuilder.java, ExprNodeConverter.java, and RexNodeConverter.java). > Secondly, we need to make sure we read/write timestamp data correctly from/to Druid. > - When we write timestamp to Druid, we should include the timezone, which would allow Druid to handle them properly. We do that already. > - When we read timestamp from Druid, we should transform the timestamp to be based on Hive timezone. This will give us a consistent behavior of Druid-on-Hive vs Hive-standalone, since timestamp in Hive is represented to the user using Hive client timezone. Currently we do not do that. -- This message was sent by Atlassian JIRA (v6.3.15#6346)