[ 
https://issues.apache.org/jira/browse/IMPALA-3759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16944928#comment-16944928
 ] 

Greg Rahn commented on IMPALA-3759:
-----------------------------------

Converting from these input formats to DATE is supported via IMPALA-4018 which 
implements the ISO SQL 2016 functionality.

{noformat}
select 
  cast('2000123' as date format 'yyyyddd') as julian_to_date,
  cast('20000502' as date format 'yyyymmdd') as yymmdd_to_date
;  

+----------------+----------------+
| julian_to_date | yymmdd_to_date |
+----------------+----------------+
| 2000-05-02     | 2000-05-02     |
+----------------+----------------+
{noformat}

> Add function for unix_timestamp with date format yyyyDDD
> --------------------------------------------------------
>
>                 Key: IMPALA-3759
>                 URL: https://issues.apache.org/jira/browse/IMPALA-3759
>             Project: IMPALA
>          Issue Type: New Feature
>          Components: Backend
>    Affects Versions: Impala 2.3.0
>            Reporter: Pavas Garg
>            Priority: Minor
>              Labels: built-in-function, ramp-up
>
> Add function for unix_timestamp with date format yyyyDDD 
> This works good from hive beeline shell
> Select unix_timestamp('2000123', 'yyyyDDD') as julian_unix
> , from_unixtime(unix_timestamp('2000123', 'yyyyDDD')) as julian_date
> , unix_timestamp('20000502', 'yyMMDD') as yymmdd_unix
> , from_unixtime(unix_timestamp('20000502', 'yyMMDD')) as yymmdd_date
> But does not from impala-shell, throwing message - 
> WARNINGS: Bad date/time conversion format: yyyyDDD
> Require the Hive functionality in Impala to deal with Julian dates.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to