[ 
https://issues.apache.org/jira/browse/AVRO-2256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16687041#comment-16687041
 ] 

ASF GitHub Bot commented on AVRO-2256:
--------------------------------------

tjwp commented on a change in pull request #368: AVRO-2256 Prevent error 
checking compatibility of a record reading a union in Ruby
URL: https://github.com/apache/avro/pull/368#discussion_r233596859
 
 

 ##########
 File path: lang/ruby/lib/avro/schema_compatibility.rb
 ##########
 @@ -141,6 +141,8 @@ def match_union_schemas(writers_schema, readers_schema)
       end
 
       def match_record_schemas(writers_schema, readers_schema)
+        return false if writers_schema.type_sym == :union
 
 Review comment:
   That's correct it will always return `false` for a union.
   
   From a schema compatibility perspective, that is correct. If there writer's 
schema was union, then in general it cannot be guaranteed that a record schema 
in the reader is compatible with it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Error checking compatibility of record reader schema with union writer schema
> -----------------------------------------------------------------------------
>
>                 Key: AVRO-2256
>                 URL: https://issues.apache.org/jira/browse/AVRO-2256
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: ruby
>    Affects Versions: 1.9.0
>            Reporter: Tim Perkins
>            Assignee: Tim Perkins
>            Priority: Critical
>             Fix For: 1.9.0
>
>
> This raises a missing method error because the comparison is invalid.
> Fix: https://github.com/apache/avro/pull/368



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to