hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergio Peña (JIRA) <>
Subject [jira] [Commented] (HIVE-3454) Problem with CAST(BIGINT as TIMESTAMP)
Date Wed, 11 Feb 2015 16:57:12 GMT


Sergio Peña commented on HIVE-3454:

It looks very good.

I agree with [~aihuaxu], if users were using workarounds, then they shouldn't have any problem
with this change, as float/double would work fine.The only thing is what if users are using
integer values to get the timestamp? If they know that they need to pass milliseconds, they
they could have these values in their queries; and now this change would give them unexpected
values. However, the wiki states that seconds is the allowed number, so these users are using
it incorrectly.

I agree with this change so that it fixes the bug, and complies with the wiki page.


> Problem with CAST(BIGINT as TIMESTAMP)
> --------------------------------------
>                 Key: HIVE-3454
>                 URL:
>             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
>         Attachments: HIVE-3454.1.patch.txt, HIVE-3454.2.patch, 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

View raw message