CruiseCheung created HIVE-24972: ----------------------------------- Summary: 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
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 hive 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)