Aihua Xu commented on HIVE-9917:

Thanks Jason. 

Regarding implicit conversion, I checked the doc 
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types and 
timestamp can't implicitly convert to/from other types (except void or 
timestamp), which makes sense since they are not compatible data types. 

I did verify hive against hbase and they are working as expected.

I missed the converting from timestamp to int/long. Seems the original casting 
from timestamp to int/long doesn't work at all (always returns 0). I will file 
a new jira to fix that. 

hive> select * from tbl1;
1969-12-31 19:00:00.123
hive> select cast(ts as bigint) from tbl1;

> After HIVE-3454 is done, make int to timestamp conversion configurable
> ----------------------------------------------------------------------
>                 Key: HIVE-9917
>                 URL: https://issues.apache.org/jira/browse/HIVE-9917
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Aihua Xu
>            Assignee: Aihua Xu
>         Attachments: HIVE-9917.patch
> After HIVE-3454 is fixed, we will have correct behavior of converting int to 
> timestamp. While the customers are using such incorrect behavior for so long, 
> better to make it configurable so that in one release, it will default to 
> old/inconsistent way and the next release will default to new/consistent way. 
> And then we will deprecate it.

This message was sent by Atlassian JIRA

Reply via email to