[ 
https://issues.apache.org/jira/browse/BEAM-9615?focusedWorklogId=470549&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-470549
 ]

ASF GitHub Bot logged work on BEAM-9615:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Aug/20 03:45
            Start Date: 14/Aug/20 03:45
    Worklog Time Spent: 10m 
      Work Description: youngoli commented on a change in pull request #12554:
URL: https://github.com/apache/beam/pull/12554#discussion_r470392567



##########
File path: sdks/go/pkg/beam/core/runtime/graphx/schema/schema_test.go
##########
@@ -161,18 +354,22 @@ func TestSchemaConversion(t *testing.T) {
                                if err != nil {
                                        t.Fatalf("error ToType(%v) = %v", 
test.st, err)
                                }
-
-                               if d := 
cmp.Diff(reflect.New(test.rt).Elem().Interface(), 
reflect.New(got).Elem().Interface()); d != "" {
-                                       t.Errorf("diff (-want, +got): %v", d)
+                               if !test.rt.AssignableTo(got) {
+                                       t.Errorf("%v not assignable to %v", 
test.rt, got)
+                                       if d := 
cmp.Diff(reflect.New(test.rt).Elem().Interface(), 
reflect.New(got).Elem().Interface()); d != "" {
+                                               t.Errorf("diff (-want, +got): 
%v", d)
+                                       }
                                }
                        }
                        {
                                got, err := FromType(test.rt)
                                if err != nil {
                                        t.Fatalf("error FromType(%v) = %v", 
test.rt, err)
                                }
-
-                               if d := cmp.Diff(test.st, got); d != "" {
+                               if d := cmp.Diff(test.st, got,
+                                       protocmp.Transform(),
+                                       
protocmp.IgnoreFields(proto.MessageV2(&pipepb.Schema{}), "id", "options"),

Review comment:
       I get why this is ignoring the "id" field for the proto, but why 
"options"? This test seems to already be testing options in the other direction 
(options are respected when converting from schemas to reflect types). I figure 
it would also want to test that options are included as expected when 
converting to schemas.




----------------------------------------------------------------
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: 470549)
    Time Spent: 11h 40m  (was: 11.5h)

> [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: 11h 40m
>  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)

Reply via email to