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

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

dorner commented on issue #320: AVRO-2199:  Validate that field defaults have 
the correct type
URL: https://github.com/apache/avro/pull/320#issuecomment-429034100
 
 
   @theturtle32 I definitely feel your pain. But the fact is that the current 
implementation is incorrect - the fact that you have bad data out there is a 
result of the incorrect implementation. In my case we had other Avro consumers 
not written in Ruby whose parsers were stricter that were crashing because we 
were sending bad data, so IMO it's more important to fix the behavior in Ruby 
which doesn't match the Avro specification.
   
   We should definitely make this a breaking change (1.9.0 instead of 1.8.3) so 
people can be made aware of this.

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


>  Validate that field defaults have the correct type
> ---------------------------------------------------
>
>                 Key: AVRO-2199
>                 URL: https://issues.apache.org/jira/browse/AVRO-2199
>             Project: Avro
>          Issue Type: Improvement
>          Components: ruby
>    Affects Versions: 1.8.2
>            Reporter: Daniel Orner
>            Priority: Minor
>
> Currently, on the master branch, when a schema is parsed, it is possible to 
> define a field with a type and a default of a totally different type. E.g. if 
> the field has type "string", the default can be set to "null".
> I'd like to open a PR which will fix this by running the default through the 
> SchemaValidator whenever a new Field is created. See 
> [https://github.com/salsify/avro-patches/pull/16]
> cc: [~tjwp]



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

Reply via email to