yashmayya opened a new pull request, #14739: URL: https://github.com/apache/pinot/pull/14739
- https://github.com/apache/pinot/pull/14723 replaced `SimpleDateFormat` with `DateTimeFormatter` to resolve thread safety / concurrency issues. - However, this causes a bug where a string like `'2024-12-31 12:18:42.375'` that was parseable with `DateTimeUtils.getDateFromString` now fails with `java.time.format.DateTimeParseException: Text '2024-12-31 12:18:42.375' could not be parsed, unparsed text found at index 10 `. - `SimpleDateFormat` is lenient in its parsing and can tolerate extra text in the input if the pattern doesn't fully cover the string. It will basically successfully parse as much as it can and ignore the rest. - The newer `DateTimeFormatter` is stricter than SimpleDateFormat and expects the input string to match the pattern exactly. This can be resolved by adding an optional section in the pattern to tolerate inputs like the above (even though we won't actual use the time portion for date parsing). -- 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]
