[
https://issues.apache.org/jira/browse/AVRO-1454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Doug Cutting updated AVRO-1454:
-------------------------------
Attachment: AVRO-1454.patch
Here's a new patch to try that fixes a couple of issues with the earlier patch.
However from the description it looks like your schema is a record, which
should work with the earlier patch. This one should also work if the schema is
simply "float" or "double".
Can please you send a paraphrased version of your schema, with names changed
and other fields removed if needed? That might help.
Also, are you certain you tested with a patched Avro jar? If running on a
distributed cluster, did you make sure there were no other versions of Avro on
the classpath?
> AvroAsTextInput format creates invalid JSON for NaN values
> ----------------------------------------------------------
>
> Key: AVRO-1454
> URL: https://issues.apache.org/jira/browse/AVRO-1454
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.7.5
> Reporter: Antonio Piccolboni
> Assignee: Doug Cutting
> Fix For: 1.7.7
>
> Attachments: AVRO-1454.patch, AVRO-1454.patch
>
>
> The AvroAsTextInput format generates a record containing
> [omitted] , "someName": NaN}
> A json parser chokes on that and it is not legal JSON AFAIK. In related
> issues AVRO-972 and AVRO-1290 it is resolved, for lack of a better option, to
> map the value NaN to the string "NaN", which needs to be quoted in JSON. Our
> parser can handle that with no modifications, Java will parse such a string
> to the correct value using standard libraries.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)