zabetak opened a new pull request, #4545:
URL: https://github.com/apache/hive/pull/4545

   Without these changes the parser consumes fully the input string and if the 
input does not match exactly the expected pattern null is returned.
   
   However there are cases where the input string starts with a completely 
valid date that matches the pattern but then it is followed by other 
characters; for example timestamps.
   
   The `DateParser` can handle `2023-08-03T16:02:00` but will return null for 
`2023-08-03_16:02:00`. Interestingly, it also handles fine `2023-08-03TGARBAGE` 
but not `2023-08-03_GARBAGE`.
   
   With these changes the `DateParser` can now extract valid dates even if 
there are trailing invalid chars after the expected pattern.
   
   The changes restore backward compatibility when parting dates since partial 
parsing used to work before HIVE-20007. At the same time, it makes parsing more 
uniform since we do not treat 'T' or space (' ') as special cases and 
simplifies the parsing code.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to