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

Jinchul Kim resolved IMPALA-5146.
---------------------------------
    Resolution: Fixed

> from_unixtime() given an out-of-range unix time produces inconsistent results
> -----------------------------------------------------------------------------
>
>                 Key: IMPALA-5146
>                 URL: https://issues.apache.org/jira/browse/IMPALA-5146
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>            Reporter: Dan Hecht
>            Assignee: Jinchul Kim
>              Labels: newbie
>
> The {{FROM_UNIXTIME(time)}} and {{FROM_UNIXTIME(time, fmt)}} produce 
> different results when {{time}} is out of range of TimestampValue.  The 
> former produces an empty string, while the latter gives null (the latter 
> being better).
> {code}
> [dhecht-desktop.ca.cloudera.com:21000] > select 
> from_unixtime(999999999999999);
> Query: select from_unixtime(999999999999999)
> Query submitted at: 2017-03-31 10:00:14 (Coordinator: 
> http://dhecht-desktop.ca.cloudera.com:25000)
> Query progress can be monitored at: 
> http://dhecht-desktop.ca.cloudera.com:25000/query_plan?query_id=ee4630ce642b62eb:c666b0f500000000
> +--------------------------------+
> | from_unixtime(999999999999999) |
> +--------------------------------+
> |                                |
> +--------------------------------+
> Fetched 1 row(s) in 0.01s
> [dhecht-desktop.ca.cloudera.com:21000] > select 
> from_unixtime(999999999999999, "yyyy-MM-dd HH:mm:ss.SSSS");
> Query: select from_unixtime(999999999999999, "yyyy-MM-dd HH:mm:ss.SSSS")
> Query submitted at: 2017-03-31 10:03:47 (Coordinator: 
> http://dhecht-desktop.ca.cloudera.com:25000)
> Query progress can be monitored at: 
> http://dhecht-desktop.ca.cloudera.com:25000/query_plan?query_id=4d46d2087b6f74c0:8ab6d24600000000
> +------------------------------------------------------------+
> | from_unixtime(999999999999999, 'yyyy-mm-dd hh:mm:ss.ssss') |
> +------------------------------------------------------------+
> | NULL                                                       |
> +------------------------------------------------------------+
> Fetched 1 row(s) in 0.01s
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to