You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Ryan Skraba (Jira)" <ji...@apache.org> on 2020/09/14 11:30:00 UTC

[jira] [Updated] (AVRO-2907) Ruby schema.single_object_schema_fingerprint is reversed

     [ https://issues.apache.org/jira/browse/AVRO-2907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan Skraba updated AVRO-2907:
------------------------------
    Fix Version/s: 1.10.1
                   1.11.0

> 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
>            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)