hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Pivovarov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-10275) GenericUDF getTimestampValue should return Timestamp instead of Date
Date Fri, 10 Apr 2015 17:37:12 GMT

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

Alexander Pivovarov commented on HIVE-10275:
--------------------------------------------

Tests look good.

Fixed method is used only by one UDF - GenericUDFMonthsBetween.

> GenericUDF getTimestampValue should return Timestamp instead of Date
> --------------------------------------------------------------------
>
>                 Key: HIVE-10275
>                 URL: https://issues.apache.org/jira/browse/HIVE-10275
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>            Reporter: Alexander Pivovarov
>            Assignee: Alexander Pivovarov
>         Attachments: HIVE-10275.1.patch
>
>
> Currently getTimestampValue casts Timestamp to Date and returns Date.
> Hive Timestamp type stores time with nanosecond precision.
> Timestamp class has getNanos method to extract nanoseconds.
> Date class has getTime method which returns unix time in milliseconds.
> So, it order to be able to get nanoseconds from Timestamp fields GenericUDF.getTimestampValue
should return Timestamp instead of Date.



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

Mime
View raw message