Hey folks,

I'd like to propose making the existing Date, Time, and DateTime logical
types standard portable types. This unblocks cross-language Date support —
particularly Python SDK → IcebergIO (#37823).

The Java SDK already defines these with java.time and portable URNs
(beam:logical_type:date:v1, etc.), but they're missing from schema.proto's
LogicalTypes.Enum and SchemaTranslation.STANDARD_LOGICAL_TYPES, so they
degrade to UnknownLogicalType across the language boundary.

Proposed changes:

1. Add DATE/TIME/DATETIME to LogicalTypes.Enum in schema.proto
2. Register them in STANDARD_LOGICAL_TYPES (SchemaTranslation.java)
3. Add Python SDK logical type classes (datetime.date, datetime.time)
4. Update JdbcUtil.java to also recognize the portable URNs (currently it
only handles its own legacy "DATE"/"TIME" identifiers)

I'm aware that JdbcIO currently uses its own non-portable logical types for
dates and times, and Python has a temporary JdbcDateType/JdbcTimeType shim
to match. This change would let us start deprecating those in favor of the
standard portable types, moving toward #28359.

All additive, and follows the MicrosInstant/FixedBytes pattern. Happy to
put up the PRs [ first one here: https://github.com/apache/beam/pull/37870
] — wanted to flag it since it touches the portable schema proto. OK if we
don't like this direction.  Please advise.

Related: #37823, #25946, #28359
Thanks!
Austin

Reply via email to