You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Task]: Switch to portable Data and Time type for JdbcIO #28359
This prevents cross-lang JdbcIO to read / write rows with these types. Most commonly used are Date and Time types. We should migrate them to portable logical types and also support them in Python side.
Issue Priority
Priority: 2 (default / most normal work should be filed as P2)
I recall why the Date type support was incomplete. The Java JdbcIO implemented Date and Time with non-portable logical type backed by joda Instant, while the Beam portable Date and Time logical type are backed by more modern java.time.localDate or localTime. We cannot simply change the Java JdbcIO due to concern of breaking change. This involves two difficult compatibility issues
migrate from non-portable to portable logical types
One fix could be done for transition is that adding a flag to IOs that guide them to produce java.time results and use portable logical types. This would enable Python implementation (and also eliminate the need of call LogicalType.register_logical_type(MillisInstant) if need to overwrite logical type mapping.
This issue has been marked as stale due to 150 days of inactivity. It will be closed in 30 days if no further activity occurs. If you think that’s incorrect or this issue still needs to be addressed, please simply write any comment. If closed, you can reopen the issue at any time. Thank you for your contributions.
Activity
Abacn commentedon Sep 8, 2023
Note: the following workaround can be used for columns involving Date (or Time) type, that is register your own logical type:
I recall why the Date type support was incomplete. The Java JdbcIO implemented Date and Time with non-portable logical type backed by joda Instant, while the Beam portable Date and Time logical type are backed by more modern java.time.localDate or localTime. We cannot simply change the Java JdbcIO due to concern of breaking change. This involves two difficult compatibility issues
One fix could be done for transition is that adding a flag to IOs that guide them to produce java.time results and use portable logical types. This would enable Python implementation (and also eliminate the need of call
LogicalType.register_logical_type(MillisInstant)if need to overwrite logical type mapping.lazarillo commentedon Oct 21, 2024
The link provided in migrating from joda time to java.time points to a PR that is behind Google's corp firewall.
It would help if the issues were exposed to the OS community, since it's an OS issue.
liferoad commentedon Oct 21, 2024
Thanks, just updated the comment.
Abacn commentedon Nov 3, 2025
We should still do this preferrably in Beam 3. Currently JdbcIO Date and Time types are not supported by Beam SQL as a result of this issue:
We should eliminate most non-portable logical types in https://github.com/apache/beam/blob/master/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/LogicalTypes.java
including Date and Time. Add this to Beam 3 milestone
Add DATE/TIME/DATETIME to portable LogicalTypes.Enum in schema.proto
github-actions commentedon Jul 31, 2026
This issue has been marked as stale due to 150 days of inactivity. It will be closed in 30 days if no further activity occurs. If you think that’s incorrect or this issue still needs to be addressed, please simply write any comment. If closed, you can reopen the issue at any time. Thank you for your contributions.
github-actions commentedon Sep 2, 2026
This issue has been closed due to lack of activity. If you think that is incorrect, you can reopen the issue at any time.