jiayuasu opened a new pull request, #2339: URL: https://github.com/apache/sedona/pull/2339
## Did you read the Contributor Guide? - Yes, I have read the [Contributor Rules](https://sedona.apache.org/latest/community/rule/) and [Contributor Development Guide](https://sedona.apache.org/latest/community/develop/) ## Is this PR related to a ticket? - Yes, and the PR name follows the format `[GH-2337] my subject`. Closes #2337 ## What changes were proposed in this PR? Problem: DateTimeParseException: Text '2023-12-31T12:00:00.000' could not be parsed at index 23 Root Cause: Instant.parse() requires timezone information, but GeoPackage datetime fields often don't include it Solution: Enhanced the epoch() method with fallback parsing that treats datetime strings without timezone as UTC Modified: * spark/common/src/main/scala/org/apache/sedona/sql/datasources/geopackage/transform/DataTypesTransformations.scala * Enhanced: The epoch() method to handle multiple datetime formats * Added: Support for various millisecond formats (1, 2, 3 digits, or none) * Maintained: Full backward compatibility with timezone-aware formats ## How was this patch tested? Added 1 more test case and a hand-made geopackage file that contains problematic datetime data ## Did this PR include necessary documentation updates? - No, this PR does not affect any public API so no need to change the documentation. -- 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]
