hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Harris (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-3454) Problem with CAST(BIGINT as TIMESTAMP)
Date Wed, 26 Sep 2012 05:44:07 GMT

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

Ryan Harris commented on HIVE-3454:
-----------------------------------

These are both valid options to work around the bug.  However from the Hive wiki:

https://cwiki.apache.org/Hive/languagemanual-types.html#LanguageManualTypes-Timestamps
"Supports traditional UNIX timestamp with optional nanosecond precision.

Supported conversions:

Integer numeric types: Interpreted as UNIX timestamp in seconds"


The documentation is stating that TIMESTAMP is *supposed* to accept integer numeric types.
 Nanosecond is optional.

I assume that the documentation in the wiki is the intended behavior.  It isn't working as
described in the wiki, that is why I have marked this as a bug.
                
> Problem with CAST(BIGINT as TIMESTAMP)
> --------------------------------------
>
>                 Key: HIVE-3454
>                 URL: https://issues.apache.org/jira/browse/HIVE-3454
>             Project: Hive
>          Issue Type: Bug
>          Components: Types, UDF
>    Affects Versions: 0.9.0
>            Reporter: Ryan Harris
>
> Ran into an issue while working with timestamp conversion.
> CAST(unix_timestamp() as TIMESTAMP) should create a timestamp for the current time from
the BIGINT returned by unix_timestamp()
> Instead, however, a 1970-01-16 timestamp is returned.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message