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

CruiseCheung updated HIVE-24972:
--------------------------------
       Attachment: HIVE-24972.patch
    Fix Version/s: 4.0.0
           Status: Patch Available  (was: Open)

> To_date function should compatible with non-breaking space and full-width 
> space
> -------------------------------------------------------------------------------
>
>                 Key: HIVE-24972
>                 URL: https://issues.apache.org/jira/browse/HIVE-24972
>             Project: Hive
>          Issue Type: Improvement
>    Affects Versions: 3.1.2
>            Reporter: CruiseCheung
>            Priority: Minor
>             Fix For: 4.0.0
>
>         Attachments: HIVE-24972.patch
>
>
> Suppose the input string format : "yyyy-MM-dd\u00A0hh:mm:ss", 
> select to_date('2021-04-01 01:02:03'),the space is non-breaking space or 
> full-width space, we got result '2021-04-01' on hive 1.2 , got NULL  on 
> version after 3.1.2。 
> GenericUDFDate:
> (1)hive 1.2 SimpleDateFormat.parse() ,compatibale with  non-breaking space 
> and full-width space
> (2)  use DateParser.parseDate()->Date.valueOf(),code 
> {code:java}
>  int idx = s.indexOf(" ");
> {code}
> not compatibale with  non-breaking space and full-width space



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

Reply via email to