You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Tamas Mate (JIRA)" <ji...@apache.org> on 2019/05/23 14:09:00 UTC
[jira] [Closed] (IMPALA-8367) from_unixtime Bad date/time
conversion format: u on NULL value
[ https://issues.apache.org/jira/browse/IMPALA-8367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tamas Mate closed IMPALA-8367.
------------------------------
Resolution: Not A Bug
Thanks for checking and summing this up [~grahn].
The doc of [FROM_UNIXTIME|https://impala.apache.org/docs/build/html/topics/impala_datetime_functions.html#datetime_functions__from_unixtime] points to the [TIMESTAMP Data Type|https://impala.apache.org/docs/build/html/topics/impala_timestamp.html#timestamp] which describes the supported format options. With that I believe we can close this as 'Not A Bug'.
We can revisit later if someone feels strongly that 'u' should be supported.
> from_unixtime Bad date/time conversion format: u on NULL value
> --------------------------------------------------------------
>
> Key: IMPALA-8367
> URL: https://issues.apache.org/jira/browse/IMPALA-8367
> Project: IMPALA
> Issue Type: Bug
> Components: Backend
> Affects Versions: Impala 2.11.0
> Environment: impalad version 2.11.0-cdh5.14.2 RELEASE (build ed85dce709da9557aeb28be89e8044947708876c) Built on Tue Mar 27 13:39:48 PDT 2018
> Reporter: Sergio Leoni
> Assignee: Tamas Mate
> Priority: Minor
> Labels: newbie, ramp-up
>
> The function
> {code:sql}
> from_unixtime(bigint unixtime[, string format]) {code}
> output error if the value of unixtime is NULL and format is 'u'.
>
> This doesn't work:
> {code:sql}
> SELECT FROM_UNIXTIME(NULL, 'u')
> {code}
> {noformat}
> Bad date/time conversion format: u{noformat}
>
> This works:
> {code:sql}
> SELECT FROM_UNIXTIME(NULL, 'yyyy-MM-dd')
> {code}
> {noformat}
> |from_unixtime(null, 'yyyy-mm-dd')|
> |---------------------------------|
> | NULL |
> |---------------------------------|{noformat}
>
> I haven't checked all the possible combinations.
> Other software like Hive handles this correctly.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)