From ff7260e2055b20ad8bb527e3cf399b8f13927dad Mon Sep 17 00:00:00 2001 From: brucearctor Date: Mon, 16 Mar 2026 12:11:41 -0700 Subject: [PATCH] Add DATE/TIME/DATETIME to portable LogicalTypes.Enum in schema.proto Add DATE (epoch days, INT64), TIME (nanoseconds, INT64), and DATETIME (ROW) as standard portable logical types in the schema proto definition. These logical types already exist in the Java SDK (SqlTypes.DATE, SqlTypes.TIME, SqlTypes.DATETIME) with portable URNs but were never added to LogicalTypes.Enum, preventing cross-language recognition. This is the first step toward full portable Date/Time support, unblocking IcebergIO Date type usage from the Python SDK. Fixes: #37823 See also: #25946, #28359 --- .../beam/model/pipeline/v1/schema.proto | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/model/pipeline/src/main/proto/org/apache/beam/model/pipeline/v1/schema.proto b/model/pipeline/src/main/proto/org/apache/beam/model/pipeline/v1/schema.proto index 5250aaaa1a7a..6c01c4b7388d 100644 --- a/model/pipeline/src/main/proto/org/apache/beam/model/pipeline/v1/schema.proto +++ b/model/pipeline/src/main/proto/org/apache/beam/model/pipeline/v1/schema.proto @@ -174,6 +174,26 @@ message LogicalTypes { // A variable-length string with its maximum length as the argument. VAR_CHAR = 7 [(org.apache.beam.model.pipeline.v1.beam_urn) = "beam:logical_type:var_char:v1"]; + + // A URN for Date type + // - Representation type: INT64 + // - A date without a time-zone, stored as incrementing count of days + // where day 0 is 1970-01-01 (ISO). + DATE = 8 [(org.apache.beam.model.pipeline.v1.beam_urn) = + "beam:logical_type:date:v1"]; + + // A URN for Time type + // - Representation type: INT64 + // - A time without a time-zone, stored as a count of time in + // nanoseconds. + TIME = 9 [(org.apache.beam.model.pipeline.v1.beam_urn) = + "beam:logical_type:time:v1"]; + + // A URN for DateTime type + // - Representation type: ROW + // - A date-time without a time-zone, combining Date and Time. + DATETIME = 10 [(org.apache.beam.model.pipeline.v1.beam_urn) = + "beam:logical_type:datetime:v1"]; } }