ypt commented on pull request #317: URL: https://github.com/apache/avro/pull/317#issuecomment-666683026
Hi @jszmajda (or anyone else using the Ruby single object encoding implementation from this PR), are you using the output of the Ruby `Avro::Schema.single_object_schema_fingerprint` or `Avro::Schema..single_object_encoding_header` methods? And if yes, have you compared it to the output from other languages? I've compared the output of the [Ruby implementation](https://github.com/apache/avro/blob/release-1.10.0/lang/ruby/lib/avro/schema.rb#L180) to the [Java implementation](https://github.com/apache/avro/blob/release-1.10.0/lang/java/avro/src/main/java/org/apache/avro/SchemaNormalization.java#L64), and it seems like the output of the Ruby implementation of `single_object_schema_fingerprint` is reversed in comparison. I believe that this is caused by [unnecessarily reversing the array traversal here](https://github.com/apache/avro/blob/release-1.10.0/lang/ruby/lib/avro/schema.rb#L184) during the bit mask + shift operation that constructs the little endian fingerprint for the message header. I've filed a Jira ticket here to track this: https://issues.apache.org/jira/browse/AVRO-2907 Hoping to hear if there's more to the story here and get some guidance on how to proceed. I'm happy to submit a PR that updates the Ruby implementation if folks feel ok with that. ---------------------------------------------------------------- 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: [email protected]
