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

Steve Roehrs commented on AVRO-1352:
------------------------------------

Can somebody please test this and commit - it its ok?

> Schema for fixed types corrupted when writing out in JSON format
> ----------------------------------------------------------------
>
>                 Key: AVRO-1352
>                 URL: https://issues.apache.org/jira/browse/AVRO-1352
>             Project: Avro
>          Issue Type: Bug
>          Components: c++
>    Affects Versions: 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4
>            Reporter: Steve Roehrs
>            Priority: Minor
>              Labels: patch,
>             Fix For: 1.7.7
>
>         Attachments: AVRO-1352.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> A change made in NodeImpl.cc under AVRO-1026 has introduced a bug that 
> corrupts JSON schemas when writing them to disk or dumping to a stream.  This 
> manifested when using DataFileWriter to generate a data file, and the schema 
> stored in the header was corrupted from the original schema provided.
>  
> e.g 
>  
> This:
> {noformat}
> {
>   “type”: “fixed”,
>   “name”: “Unsigned16”,
>   “size”: 2
> }
> {noformat}
>  
> Becomes this:
> {noformat}
> {
>   “type”: “fixed”,
>   “size”: 2,
>   “name” : “Unsigned16”,
> }
> {noformat}
> Note the extraneous comma after the ‘name’ attribute.
> The bug exists for Avro 'fixed' types, and has not been observed for other 
> types. A test case will be developed.
> The bug can be fixed by simply re-ordering the code in NodeFixed::printJson.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to