[ 
https://issues.apache.org/jira/browse/HIVE-24435?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zoltan Haindrich updated HIVE-24435:
------------------------------------
    Comment: was deleted

(was: looks like there are some things here
* unix_timestamp is deprecated - recommends to use current_timestamp - however 
current_timestamp doesnt take any argument; so its puzzling to suggest to use 
that
* GenericUDFUnixTimeStamp  has some implementation; but it also extends 
GenericUDFToUnixTimeStamp which also has a few vectorized implementations 
attached
* unix_timestamp behaves 100% the same as to_unix_timestamp in case an argument 
is specfied)

> Vectorized unix_timestamp is inconsistent with non-vectorized counterpart
> -------------------------------------------------------------------------
>
>                 Key: HIVE-24435
>                 URL: https://issues.apache.org/jira/browse/HIVE-24435
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>
> {code}
> create table t (d string);
> insert into t values('2020-11-16 22:18:40 UTC');
> select
>   '>' || d || '<' , unix_timestamp(d), from_unixtime(unix_timestamp(d)), 
> to_date(from_unixtime(unix_timestamp(d)))
> from t
> ;
> set hive.fetch.task.conversion=none;
> select
>   '>' || d || '<' , unix_timestamp(d), from_unixtime(unix_timestamp(d)), 
> to_date(from_unixtime(unix_timestamp(d)))
> from t
> ;
> {code}
> results:
> {code}
> -- std udf:
> >2020-11-16 22:18:40 UTC<       1605593920      2020-11-16 22:18:40     
> >2020-11-16
> -- vectorized udf
> >2020-11-16 22:18:40 UTC<       NULL    NULL    NULL
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to