[
https://issues.apache.org/jira/browse/BEAM-9615?focusedWorklogId=472091&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-472091
]
ASF GitHub Bot logged work on BEAM-9615:
----------------------------------------
Author: ASF GitHub Bot
Created on: 18/Aug/20 18:47
Start Date: 18/Aug/20 18:47
Worklog Time Spent: 10m
Work Description: TheNeuralBit commented on a change in pull request
#12553:
URL: https://github.com/apache/beam/pull/12553#discussion_r472406668
##########
File path: model/pipeline/src/main/proto/schema.proto
##########
@@ -32,16 +32,27 @@ option java_package = "org.apache.beam.model.pipeline.v1";
option java_outer_classname = "SchemaApi";
message Schema {
+ // List of fields for this schema. Two fields may not share a name.
repeated Field fields = 1;
+ // REQUIRED. An RFC 4122 UUID.
string id = 2;
repeated Option options = 3;
}
message Field {
+ // REQUIRED. Name of this field within the schema.
string name = 1;
+ // OPTIONAL. Human readable description of this field, such as the query
that generated it.
string description = 2;
FieldType type = 3;
+
int32 id = 4;
+ // OPTIONAL. The position of this field's data in the encoding.
+ // Either no fields in a given row are have encoding position populated,
+ // or all of them are. Used to support backwards compatibility with schema
+ // changes.
+ // Two schemas, one with encoding positions and one without, are equal
+ // if the fields when sorted by encoding position would otherwise be equal.
Review comment:
```suggestion
// OPTIONAL. The position of this field's data when encoded, e.g. with
beam:coder:row:v1.
// Either no fields in a given row are have encoding position populated,
// or all of them are. Used to support backwards compatibility with schema
// changes.
// If no fields have encoding position populated the order of encoding is
the same as the order in the Schema.
```
Added a reference to beam:coder:row:v1 and a note about default behavior.
Removed the note about equality - the way equality is implemented in Java, two
schemas are only equal if they are exactly the same. There are lower levels of
compatibility though, like assignable, equivalent:
https://github.com/apache/beam/blob/29ea00e7cbbb6387f6b0c6ee8b112802d1559851/sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/Schema.java#L340-L353
##########
File path: model/pipeline/src/main/proto/schema.proto
##########
@@ -97,7 +108,11 @@ message LogicalType {
}
message Option {
+ // REQUIRED. Identifier for the option.
string name = 1;
+ // Optional type specifer for the structure of value.
+ // If not present, assumes no additional configuration is needed
+ // for this option.
Review comment:
```suggestion
// for this option and value is ignored.
```
##########
File path: model/pipeline/src/main/proto/schema.proto
##########
@@ -97,7 +108,11 @@ message LogicalType {
}
message Option {
+ // REQUIRED. Identifier for the option.
string name = 1;
+ // Optional type specifer for the structure of value.
Review comment:
```suggestion
// OPTIONAL. Type specifer for the structure of value.
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 472091)
Time Spent: 14h 20m (was: 14h 10m)
> [Go SDK] Beam Schemas
> ---------------------
>
> Key: BEAM-9615
> URL: https://issues.apache.org/jira/browse/BEAM-9615
> Project: Beam
> Issue Type: New Feature
> Components: sdk-go
> Reporter: Robert Burke
> Assignee: Robert Burke
> Priority: P2
> Time Spent: 14h 20m
> Remaining Estimate: 0h
>
> Schema support is required for advanced cross language features in Beam, and
> has the opportunity to replace the current default JSON encoding of elements.
> Some quick notes, though a better fleshed out doc with details will be
> forthcoming:
> * All base coders should be implemented, and listed as coder capabilities. I
> think only stringutf8 is missing presently.
> * Should support fairly arbitrary user types, seamlessly. That is, users
> should be able to rely on it "just working" if their type is compatible.
> * Should support schema metadata tagging.
> In particular, one breaking shift in the default will be to explicitly fail
> pipelines if elements have unexported fields, when no other custom coder has
> been added. This has been a source of errors/dropped data/keys and a simply
> warning at construction time won't cut it. However, we could provide a manual
> "use beam schemas, but ignore unexported fields" registration as a work
> around.
> Edit: Doc is now at https://s.apache.org/beam-go-schemas
--
This message was sent by Atlassian Jira
(v8.3.4#803005)