hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Nadeau (JIRA)" <>
Subject [jira] [Commented] (HIVE-3454) Problem with CAST(BIGINT as TIMESTAMP)
Date Mon, 17 Sep 2012 21:13:07 GMT


Richard Nadeau commented on HIVE-3454:

Additional information/workaround:

This looks like a nanosecond bug similar to HIVE-3090, so I tried this:

cast((unix_timestamp() * 1.0) as TIMESTAMP)

and got this:

2012-09-17 14:49:39.0

Which is what it should be, but I would have expected this to be handled without the "conversion".

cast(round(unix_timestamp(),3) as TIMESTAMP)

Will also work.

> Problem with CAST(BIGINT as TIMESTAMP)
> --------------------------------------
>                 Key: HIVE-3454
>                 URL:
>             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:

View raw message