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

Austin Cawley-Edwards commented on FLINK-29863:
-----------------------------------------------

Because we're using Jackson to serialize and they support these number formats? 
If that's the case ( :( ), they seem to have been talking about this for years 
with no real progress: 
[https://github.com/FasterXML/jackson-databind/issues/911]

There's a couple of ideas in that issue for ways to correctly serialize NaN and 
infinities as `null`, but I can see that it would be hard to write test cases 
to enforce this throughout Flink's Rest API.

One thought might be to do not try to strictly enforce it, but treat all found 
occurrences as bugs — it would be nice if the JSON could be valid, as working 
with multi-type returns even if documented in OpenAPI is a bit painful. Wdyt?

> Properly handle NaN/Infinity in OpenAPI spec
> --------------------------------------------
>
>                 Key: FLINK-29863
>                 URL: https://issues.apache.org/jira/browse/FLINK-29863
>             Project: Flink
>          Issue Type: Bug
>          Components: Documentation, Runtime / REST
>    Affects Versions: 1.15.0
>            Reporter: Chesnay Schepler
>            Priority: Major
>             Fix For: 1.17.0
>
>
> Our OpenAPI spec maps all float/double fields to float64, but we at times 
> also return NaN/infinity which can't be represented as such since the JSON 
> spec doesn't support it.
> One alternative could be to document it as an either type, returning either a 
> float64 or a string.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to