You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Karen Coppage (Jira)" <ji...@apache.org> on 2019/11/20 15:37:00 UTC

[jira] [Updated] (HIVE-22511) Fix case of Month token in datetime to string conversion

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

Karen Coppage updated HIVE-22511:
---------------------------------
    Attachment: HIVE-22511.01.patch
        Status: Patch Available  (was: Open)

> Fix case of Month token in datetime to string conversion
> --------------------------------------------------------
>
>                 Key: HIVE-22511
>                 URL: https://issues.apache.org/jira/browse/HIVE-22511
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Gabor Kaszab
>            Assignee: Karen Coppage
>            Priority: Major
>         Attachments: HIVE-22511.01.patch
>
>
> Currently Hive doesn't allow month tokens with weird spelling like 'MONth', 'mONTH' etc. However, Oracle does and Hive should follow that approach.
> The rules:
> - If the first letter is lowercase then the output is lowercase: 'mONTH' -> 'may'
> - If the first two letters are uppercase then the output is uppercase: 'MOnth' -> 'MAY'
> - If the first letter is uppercase and the second is lowercase then the output is capitalized: 'Month' -> 'May'.
> Oracle:
> {code:java}
> select to_char(to_timestamp('2019-05-10', 'YYYY-MM-DD'), 'MOnthYYYY') from DUAL;
> MAY      2019
> select to_char(to_timestamp('2019-05-10', 'YYYY-MM-DD'), 'mONTHYYYY') from DUAL;
> may      2019
> select to_char(to_timestamp('2019-05-10', 'YYYY-MM-DD'), 'MoNTHYYYY') from DUAL;
> May      2019
> {code}
> Please check the same for 'Name of the day' tokens.



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