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

Daniel Russel commented on AVRO-1290:
-------------------------------------

While either of the above options (throw an exception or using the Jackson/Ruby 
convention) is an improvement for me, I do find that being able to work with 
infinity/nan as values is often useful and allows me to avoid various special 
casing and checks in my code. So I would prefer 2. As a particular example 
here, I need a sentinel value (as well as being able to support normal double 
values). Being able to use NaN or infinity works quite naturally and avoids 
fussing with edge cases caused by conversion precision or such.
                
> AvroCpp json text backend produces "inf" for double values of infinity but 
> won't consume them
> ---------------------------------------------------------------------------------------------
>
>                 Key: AVRO-1290
>                 URL: https://issues.apache.org/jira/browse/AVRO-1290
>             Project: Avro
>          Issue Type: Bug
>          Components: c++
>    Affects Versions: 1.7.3
>            Reporter: Daniel Russel
>         Attachments: AVRO-1290.patch, patch
>
>
> If you use the json encoder and pass it a double with value e.g. 
> std::numeric_limits<double>::infinity() it happily writes the literal "inf". 
> However, the decoder chokes on that literal.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to