CurtHagenlocher opened a new pull request, #4921: URL: https://github.com/apache/arrow-adbc/pull/4921
## What's changed When a struct is serialized to JSON (the default `StructBehavior.JsonString`), float and double fields are written with `Utf8JsonWriter.WriteNumberValue`. That throws `ArgumentException` for NaN and ±Infinity, so a single non-finite value made its whole row unreadable. These values are now written as the strings `"NaN"`, `"Infinity"` and `"-Infinity"`. That's how System.Text.Json writes them when `JsonNumberHandling.AllowNamedFloatingPointLiterals` is set. `StructBehavior.Strict` is unchanged and still returns the actual `float`/`double` values. This came up in review of #4919, where variants serialized to JSON use the same writer. ### Tests `NonFiniteFloat` and `NonFiniteDouble` check the JSON for NaN, Infinity and -Infinity. `NonFiniteDouble` also checks that the struct result keeps the actual NaN value. Without the fix, both throw the `ArgumentException`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
