chamikaramj commented on code in PR #17608:
URL: https://github.com/apache/beam/pull/17608#discussion_r871867578
##########
model/pipeline/src/main/proto/org/apache/beam/model/pipeline/v1/schema.proto:
##########
@@ -110,6 +112,27 @@ message LogicalType {
FieldValue argument = 5;
}
+// Universally defined Logical types for Row schemas.
+// These logical types are supposed to be understood by all SDKs.
+message LogicalTypes {
+ enum Enum {
+ // A URN for Python Callable logical type
+ // - Representation type: STRING
+ // - Language type: In Python SDK, PythonCallableWithSource.
+ // In any other SDKs, a wrapper object for a string which
+ // can be evaluated to a Python Callable object.
+ PYTHON_CALLABLE = 0 [(org.apache.beam.model.pipeline.v1.beam_urn) =
+ "beam:logical_type:python_callable:v1"];
+
+ // A URN for MicrosInstant type
+ // - Representation type: ROW<seconds: INT64, micros: INT64>
+ // - A timestamp without a timezone where seconds + micros represents the
+ // amount of time since the epoch.
Review Comment:
Probably we should move all logical types that are expected to be understood
by all SDKs to here and remove them from the definition in the comment.
"beam:logical_type:micros_instant:v1"" and "beam:logical_type:schema:v1" seems
to be the only two logical types defined there (even though latter is only
supported by Java currently).
By "update the usages", I meant update the Java/Python classes where the URN
is defined to refer to the proto message instead. Seems like you already did
this for "beam:logical_type:micros_instant:v1".
--
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]