From issues-return-182513-archive-asf-public=cust-asf.ponee.io@hive.apache.org Wed Mar 18 01:35:03 2020 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id B98F318066D for ; Wed, 18 Mar 2020 02:35:02 +0100 (CET) Received: (qmail 83677 invoked by uid 500); 18 Mar 2020 01:35:02 -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 83636 invoked by uid 99); 18 Mar 2020 01:35:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Mar 2020 01:35:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 3B2F3E2E12 for ; Wed, 18 Mar 2020 01:35:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 5835A780402 for ; Wed, 18 Mar 2020 01:35:00 +0000 (UTC) Date: Wed, 18 Mar 2020 01:35:00 +0000 (UTC) From: "Jesus Camacho Rodriguez (Jira)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-22476) Hive datediff function provided inconsistent results when hive.fetch.task.conversion is set to none MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-22476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17061298#comment-17061298 ] Jesus Camacho Rodriguez commented on HIVE-22476: ------------------------------------------------ [~bslim], could you rebase this patch / create a PR so we can check it in? Thanks > Hive datediff function provided inconsistent results when hive.fetch.task.conversion is set to none > --------------------------------------------------------------------------------------------------- > > Key: HIVE-22476 > URL: https://issues.apache.org/jira/browse/HIVE-22476 > Project: Hive > Issue Type: Bug > Reporter: Slim Bouguerra > Assignee: Slim Bouguerra > Priority: Major > Attachments: HIVE-22476.2.patch, HIVE-22476.3.patch, HIVE-22476.5.patch, HIVE-22476.6.patch, HIVE-22476.7.patch, HIVE-22476.7.patch, HIVE-22476.8.patch, HIVE-22476.8.patch, HIVE-22476.8.patch > > > The actual issue stems to the different date parser used by various part of the engine. > Fetch task uses udfdatediff via {code} org.apache.hadoop.hive.ql.udf.generic.GenericUDFToDate{code} while the vectorized llap execution uses {code}VectorUDFDateDiffScalarCol{code}. > This fix is meant to be not very intrusive and will add more support to the GenericUDFToDate by enhancing the parser. > For the longer term will be better to use one parser for all the operators. > Thanks [~Rajkumar Singh] for the repro example > {code} > create external table testdatediff(datetimecol string) stored as orc; > insert into testdatediff values ('2019-09-09T10:45:49+02:00'),('2019-07-24'); > select datetimecol from testdatediff where datediff(cast(current_timestamp as string), datetimecol)<183; > set hive.ferch.task.conversion=none; > select datetimecol from testdatediff where datediff(cast(current_timestamp as string), datetimecol)<183; > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)