Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GenericDatumWriter encodes Fixed type as Bytes type #78

Open
irshusdock opened this issue Jun 10, 2016 · 0 comments
Open

GenericDatumWriter encodes Fixed type as Bytes type #78

irshusdock opened this issue Jun 10, 2016 · 0 comments

Comments

@irshusdock
Copy link

I'm not sure if this is intentional or not, but the GenericDatumWriter currently writes the Fixed type as a Bytes type. That is to say it prepends the bytes with the length of the byte array. This does not follow avro's serialization for Fixed types (which does not include the length of the array). I noticed that in SpecificDatumWriter, the Fixed type is encoded as a Fixed type, hence why I'm not sure if this was intentional or not.

func (writer *GenericDatumWriter) writeFixed(v interface{}, enc Encoder, s Schema) error {
return writer.writeBytes(v, enc)
}

crast pushed a commit to crast/avro that referenced this issue Aug 4, 2016
crast referenced this issue in go-avro/avro Nov 3, 2016
Fix encoding of 'fixed' type. Fixes #78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant