lostluck opened a new issue, #23101:
URL: https://github.com/apache/beam/issues/23101
### What would you like to happen?
Map types are able to be encoded if they are fields in a struct. This lets
them take advantage of the Beam Schema Row coder which knows how to encode
these fields.
For maps in particular, we should suggest the work around of wrapping in an
explicit struct type with an exported field.
Slices and Arrays may need a similar treatment.
Channels, funcs, and unregistered interface types remain unencodeable.
```
F0907 15:34:11.803229 3396182 main.go:87] Failed to execute job: failed to
generate model pipeline: failed to encode custom coder for type json. Make sure
the type was registered before calling beam.Init. For example:
beam.RegisterType(reflect.TypeOf((*TypeName)(nil)).Elem())
Full error:
failed to add input kind:
{google3/third_party/golang/apache_beam/pkg/beam/beam.dropKeyFn 8: ParDo
[In(Main): KV<X,Y> <- {7:
KV<int,map[string]int>/KV<int[varintz],map[string]int[json]> GLO}] -> [Out: Y
-> {8: map[string]int/map[string]int[json] GLO}]}
caused by:
failed to marshal KV coder KV<int[varintz],map[string]int[json]>
caused by:
failed to marshal the coder map[string]int[json].
caused by:
encoding custom coder map[string]int[json] for type map[string]int
unencodable type map[string]int
```
### Issue Priority
Priority: 3
### Issue Component
Component: sdk-go
--
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]