You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Gabor Kaszab (JIRA)" <ji...@apache.org> on 2019/05/08 09:51:00 UTC
[jira] [Commented] (IMPALA-3381) Impala to support AM/PM format in
unix_timestamp and from_unixtime
[ https://issues.apache.org/jira/browse/IMPALA-3381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16835475#comment-16835475 ]
Gabor Kaszab commented on IMPALA-3381:
--------------------------------------
Note, https://issues.apache.org/jira/browse/IMPALA-4018 that I'm currently actively working on introduces ISO:SQL:2016 compliant datetime patterns that would also include AM/PM. It won't come by default for to_timestamp() and similar functions but will be a feature flag to switch the pattern handling to the new approach for currently existing functions.
Note2, users might have to rewrite their patterns to use the new handling (that includes AM/PM) Just a ew examples:
- minute token will be case insensitive "MI" instead of lowercase "mm"
- "hh24" will serve as 0-23 hours while case insensitive "hh" will accept values 1-12.
- For a total list of tokens see the proposal doc under the linked Jira.
However, I feel that it will be no point implementing this Jira to extend the old way of pattern handling as we would like everyone to move to the ISO:SQL compliant handling eventually. Are all the participants comfortable of closing this as a duplicate?
> Impala to support AM/PM format in unix_timestamp and from_unixtime
> ------------------------------------------------------------------
>
> Key: IMPALA-3381
> URL: https://issues.apache.org/jira/browse/IMPALA-3381
> Project: IMPALA
> Issue Type: New Feature
> Components: Backend
> Affects Versions: Impala 2.5.0
> Reporter: Yibing Shi
> Assignee: Attila Jeges
> Priority: Minor
> Labels: built-in-function
>
> Need a way to support below format in {{unix_timestamp}}, and {{from_unixtime}} if possible:
> {noformat}
> 20151214 05:15:00.1234 AM
> 20151214 05:15:00.1234 PM
> {noformat}
> An example:
> {noformat}
> unix_timestamp('20151214 05:15:00.1234 PM', 'yyyyMMdd HH:mm:ss.SSS PP')
> {noformat}
> Of course we can choose a different format, only if we can interpret the AM/PM part of a date time string.
> *The function need to support up to nanosecond*
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org