lostluck commented on code in PR #24844:
URL: https://github.com/apache/beam/pull/24844#discussion_r1062804891


##########
sdks/go/pkg/beam/core/runtime/graphx/coder.go:
##########
@@ -446,10 +446,9 @@ func (b *CoderMarshaller) Add(c *coder.Coder) (string, 
error) {
        case coder.Custom:
                ref, err := encodeCustomCoder(c.Custom)
                if err != nil {
-                       typeName := c.Custom.Name
-                       return "", errors.SetTopLevelMsgf(err, "failed to 
encode custom coder for type %s. "+
+                       return "", errors.SetTopLevelMsgf(err, "failed to 
encode custom coder %s for TypeName %s. "+
                                "Make sure the type was registered before 
calling beam.Init. For example: "+
-                               
"beam.RegisterType(reflect.TypeOf((*TypeName)(nil)).Elem())", typeName)
+                               
"beam.RegisterType(reflect.TypeOf((*TypeName)(nil)).Elem()). Some types can't 
be registered, see invalid registration types as below:(Link)", c, 
c.Custom.Type)

Review Comment:
   "Some types, like maps, slices, arrays, channels, and functions cannot be 
registered as types."



-- 
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]

Reply via email to