Details
Description
The function
from_unixtime(bigint unixtime[, string format])
output error if the value of unixtime is NULL and format is 'u'.
This doesn't work:
SELECT FROM_UNIXTIME(NULL, 'u')
Bad date/time conversion format: u
This works:
SELECT FROM_UNIXTIME(NULL, 'yyyy-MM-dd')
|from_unixtime(null, 'yyyy-mm-dd')| |---------------------------------| | NULL | |---------------------------------|
I haven't checked all the possible combinations.
Other software like Hive handles this correctly.
Attachments
Issue Links
- is related to
-
IMPALA-8580 Impala Doc: Explain SimpleDateFormat in Impala
- Closed
- relates to
-
IMPALA-2190 Complete conversion functions between timestamp, unixtime/epoch, and string dates
- Resolved
-
IMPALA-4018 Add support for SQL:2016 datetime templates/patterns/masks to CAST(... AS ... FORMAT <template>)
- Closed