File tree Expand file tree Collapse file tree
model/pipeline/src/main/proto/org/apache/beam/model/pipeline/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1073,6 +1073,10 @@ message StandardCoders {
10731073 // Components: None
10741074 ROW = 13 [(beam_urn) = "beam:coder:row:v1" ];
10751075
1076+ // Similar to ROW above, but for arbitrary types that can be converted
1077+ // to and from row objects, which can then be encoded with a schema.
1078+ SCHEMA = 18 [(beam_urn) = "beam:coder:schema:v1" ];
1079+
10761080 // Encodes a user key and a shard id which is an opaque byte string.
10771081 //
10781082 // The encoding for a sharded key consists of a shard id byte string and the
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ message Field {
4848 // OPTIONAL. Human readable description of this field, such as the query that generated it.
4949 string description = 2 ;
5050 FieldType type = 3 ;
51-
51+
5252 int32 id = 4 ;
5353 // OPTIONAL. The position of this field's data when encoded, e.g. with beam:coder:row:v1.
5454 // Either no fields in a given row are have encoding position populated,
@@ -237,3 +237,23 @@ message MapTypeEntry {
237237message LogicalTypeValue {
238238 FieldValue value = 1 ;
239239}
240+
241+ // Information needed to represent a Coder of type SCHEMA.
242+ message SchemaCoderPayload {
243+ // The schema to use for encoding corresponding Row types.
244+ Schema schema = 1 ;
245+
246+ // Function mapping from underlying object to Row type.
247+ FunctionSpec to_row_fn = 2 ;
248+
249+ // Function mapping from Row type to underlying object.
250+ FunctionSpec from_row_fn = 3 ;
251+
252+ // Any additional information SDKs need to encode/decode elements.
253+ repeated AdditionalCoderInfo additional_coder_infos = 4 ;
254+
255+ message AdditionalCoderInfo {
256+ string urn = 1 ;
257+ bytes payload = 2 ;
258+ }
259+ }
You can’t perform that action at this time.
0 commit comments