Skip to content

Commit

Permalink
marshalUDT: allow not using all the UDT fields
Browse files Browse the repository at this point in the history
When inserting a UDT via a map, allow the map to be a subset of the UDT.

Fixes #841
  • Loading branch information
Zariel committed Nov 29, 2016
1 parent 5f4a76e commit 2bcf64d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion marshal.go
Expand Up @@ -1590,7 +1590,7 @@ func marshalUDT(info TypeInfo, value interface{}) ([]byte, error) {
for _, e := range udt.Elements {
val, ok := v[e.Name]
if !ok {
return nil, marshalErrorf("missing UDT field in map: %s", e.Name)
continue
}

data, err := Marshal(e.Type, val)
Expand Down

0 comments on commit 2bcf64d

Please sign in to comment.