[
https://issues.apache.org/jira/browse/AVRO-1352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14016056#comment-14016056
]
Steve Roehrs commented on AVRO-1352:
------------------------------------
I don't have a stand-alone test case unfortunately, only our production
code which I can't release. I should be able to put together a small
test case though.
Steve Roehrs
Senior Software Engineer | Lockheed Martin
This email and any attachment to it remains the property of Lockheed
Martin and is intended only to be read or used by the named addressee.
It may contain information that is confidential, commercially valuable
or subject to legal privilege. If you receive this email in error,
please immediately delete it and notify the sender. Opinions,
conclusions and other information in this message that do not relate to
the official business of Lockheed Martin or any companies within
Lockheed Martin shall be understood as neither given nor endorsed by
them.
-----Original Message-----
From: John Karp (JIRA) [mailto:[email protected]]
Sent: Tuesday, June 03, 2014 8:46 AM
To: [email protected]
Subject: [jira] [Commented] (AVRO-1352) Schema for fixed types corrupted
when writing out in JSON format
[
https://issues.apache.org/jira/browse/AVRO-1352?page=com.atlassian.jira.
plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14016031#
comment-14016031 ]
John Karp commented on AVRO-1352:
---------------------------------
Do you have a unit test that fails against trunk avro but passes after
the patch is applied? (I don't have commit rights, I'm just curious.)
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.
other types. A test case will be developed.
NodeFixed::printJson.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
This message is intended only for the use of the intended recipient(s)
If you are not an intended recipient, you are hereby notified that any
use, dissemination, disclosure or copying of this communication is
strictly prohibited. If you have received this communication in error
please destroy all copies of this message and its attachments and notify
the sender immediately
> 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)