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

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

After commenting on HIVE-3822 I've realized that even with this 
quasi-workaround, the cast(int/float/double as timestamp) is fundamentally 
broken.
When an epoch (assumed GMT) timestamp is passed through the cast() function it 
is converted to a different time based on the local timezone...this doesn't 
happen if the timestamp is cast from a formatted date string....this behavior 
is inconsistent.

Furthermore, when attempting to use the to_utc_timestamp() function with a 
epoch date value the implicit cast() poisons the result of the timestamp that 
is stored by to_utc_timestamp()

Something is definitely wrong.
                
> 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

Reply via email to