From issues-return-65638-archive-asf-public=cust-asf.ponee.io@drill.apache.org Wed May 8 07:56:02 2019 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 4DFF7180630 for ; Wed, 8 May 2019 09:56:02 +0200 (CEST) Received: (qmail 96848 invoked by uid 500); 8 May 2019 07:56:01 -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 96837 invoked by uid 99); 8 May 2019 07:56:01 -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, 08 May 2019 07:56:01 +0000 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 02700E25AC for ; Wed, 8 May 2019 07:56:01 +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 AD6DD256C1 for ; Wed, 8 May 2019 07:56:00 +0000 (UTC) Date: Wed, 8 May 2019 07:56:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-4782) TO_TIME function cannot separate time from date time string 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/DRILL-4782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16835403#comment-16835403 ] ASF GitHub Bot commented on DRILL-4782: --------------------------------------- ihuzenko commented on pull request #1784: DRILL-4782 / DRILL-7139: Fix cast and arithmetic for DayInterval URL: https://github.com/apache/drill/pull/1784#discussion_r281949514 ########## File path: exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/IntervalIntervalArithmetic.java ########## @@ -64,8 +64,17 @@ public void eval() { <#elseif intervaltype == "IntervalYear"> out.value = left.value + right.value; <#elseif intervaltype == "IntervalDay"> + long millis = (long) left.milliseconds + right.milliseconds; out.days = left.days + right.days; - out.milliseconds = left.milliseconds + right.milliseconds; + + // Subtracts all full days from millis Review comment: ```suggestion ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org > TO_TIME function cannot separate time from date time string > ----------------------------------------------------------- > > Key: DRILL-4782 > URL: https://issues.apache.org/jira/browse/DRILL-4782 > Project: Apache Drill > Issue Type: Improvement > Components: Server > Affects Versions: 1.6.0, 1.7.0 > Environment: CentOS 7 > Reporter: Matt Keranen > Assignee: Dmytriy Grinchenko > Priority: Minor > Fix For: 1.17.0 > > > TO_TIME('2016-03-03 00:00', ''yyyy-MM-dd HH:mm') returns "05:14:46.656" instead of the expected "00:00:00" > Adding and additional split does work as expected: TO_TIME(SPLIT('2016-03-03 00:00', ' ')[1], 'HH:mm') -- This message was sent by Atlassian JIRA (v7.6.3#76005)