You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Yin Huai (JIRA)" <ji...@apache.org> on 2015/11/19 23:24:11 UTC

[jira] [Commented] (HIVE-3454) Problem with CAST(BIGINT as TIMESTAMP)

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

Yin Huai commented on HIVE-3454:
--------------------------------

Seems this issue has not been fixe completely. I still see
{code}
hive> SELECT CAST(CAST(-1200.0 AS TIMESTAMP) AS DOUBLE);
OK
-1200.0
Time taken: 0.047 seconds, Fetched: 1 row(s)
hive> SELECT CAST(CAST(-1200 AS TIMESTAMP) AS INT);
OK
-2
Time taken: 0.044 seconds, Fetched: 1 row(s)
{code}

> 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.8.0, 0.8.1, 0.9.0, 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.13.1
>            Reporter: Ryan Harris
>            Assignee: Aihua Xu
>              Labels: newbie, newdev, patch
>             Fix For: 1.2.0
>
>         Attachments: HIVE-3454.1.patch.txt, HIVE-3454.3.patch, HIVE-3454.patch
>
>
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)