You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/09/14 21:11:10 UTC

[GitHub] [beam] lostluck commented on a change in pull request #12588: [BEAM-7009] Add Go SDK Standard Coders yaml tests.

lostluck commented on a change in pull request #12588:
URL: https://github.com/apache/beam/pull/12588#discussion_r488222388



##########
File path: sdks/go/pkg/beam/core/runtime/exec/coder.go
##########
@@ -81,24 +82,82 @@ func MakeElementEncoder(c *coder.Coder) ElementEncoder {
 		return &stringEncoder{}
 
 	case coder.Custom:
-		return &customEncoder{
+		enc := &customEncoder{
 			t:   c.Custom.Type,
 			enc: makeEncoder(c.Custom.Enc.Fn),
 		}
+		if c.Custom.Name != "schema" {
+			return enc
+		}
+		// Custom schema coding is shorthand for using beam infrastructure
+		// wrapped in a custom coder.

Review comment:
       "Custom schema coding uses the beam row coder, but wrapping it in a length prefix and treats it as an opaque coder."
   
   Does that make more sense?




----------------------------------------------------------------
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:
users@infra.apache.org