hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raunak Jhawar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-9678) create timediff UDF
Date Tue, 10 Mar 2015 08:59:38 GMT

    [ https://issues.apache.org/jira/browse/HIVE-9678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14354573#comment-14354573
] 

Raunak Jhawar commented on HIVE-9678:
-------------------------------------

Workaround:

Convert all date time objects to unix timestamp values. Now convert the difference of two
unix time stamp into standard date time object and extract the time part from the object 

> create timediff UDF
> -------------------
>
>                 Key: HIVE-9678
>                 URL: https://issues.apache.org/jira/browse/HIVE-9678
>             Project: Hive
>          Issue Type: Improvement
>          Components: UDF
>            Reporter: Alexander Pivovarov
>            Assignee: Alexander Pivovarov
>         Attachments: HIVE-9678.1.patch, HIVE-9678.2.patch, HIVE-9678.3.patch, HIVE-9678.4.patch,
HIVE-9678.4.patch
>
>
> MySQL has very useful function timediff. We should have it in Hive
> {code}
> select timediff('2015-02-12 05:09:07.140', '2015-02-12 01:18:20');
> OK
> 03:50:47.140
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message