[ https://issues.apache.org/jira/browse/AVRO-2907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17195401#comment-17195401 ]
ASF subversion and git services commented on AVRO-2907: ------------------------------------------------------- Commit dd5971d83abb30efbec5b3cd606cbdbd0a69ccee in avro's branch refs/heads/branch-1.10 from ypt [ https://gitbox.apache.org/repos/asf?p=avro.git;h=dd5971d ] AVRO-2907: Fix Ruby single object encoding fingerprint and header (#937) The bit masking + shifting operation should already result in grabbing the least significant bytes first for the little endian CRC-64 fingerprint in the header - so traversing the array in reverse order is unnecessary. > Ruby schema.single_object_schema_fingerprint is reversed > -------------------------------------------------------- > > Key: AVRO-2907 > URL: https://issues.apache.org/jira/browse/AVRO-2907 > Project: Apache Avro > Issue Type: Bug > Components: ruby > Affects Versions: 1.10.0 > Reporter: Paul Tzen > Assignee: Paul Tzen > Priority: Minor > Fix For: 1.11.0, 1.10.1 > > > The Ruby > [schema.single_object_schema_fingerprint|https://github.com/apache/avro/blob/release-1.10.0/lang/ruby/lib/avro/schema.rb#L180] > method (originally added in [this > PR|https://github.com/apache/avro/pull/317]) seems to return an incorrect > fingerprint, which is reversed from what 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] > returns. > I believe that the cause is the unnecessary reverse array traversal order on > [this > line|https://github.com/apache/avro/blob/release-1.10.0/lang/ruby/lib/avro/schema.rb#L184] > during the bit masking + shifting operation for converting the fingerprint > into a little endian byte array. > I'll also drop a comment in the [original > PR|https://github.com/apache/avro/pull/317] that implements this Ruby > functionality and see if there's more to the story. -- This message was sent by Atlassian Jira (v8.3.4#803005)