huan233usc opened a new pull request, #810: URL: https://github.com/apache/iceberg-cpp/pull/810
## What A `float` / `double` column default of `NaN` or `±Infinity` passes `SchemaField::Validate` but cannot survive a metadata round-trip: the JSON serializer emits a non-finite number as `null`, which reads back as an *absent* default. The declared default is silently lost (and, because the key is present but null, the reader then errors on it). ## How `ValidateDefault` now rejects a non-finite floating default (`std::isfinite` on the float/double value) with a clear "value must be finite" error, so an unrepresentable default is caught up front rather than silently dropped on serialization. ## Testing `SchemaFieldTest.ValidateRejectsNonFiniteFloatingDefault` (NaN, +Inf, -Inf) and `ValidateAcceptsFiniteFloatingDefault`, verified fail-without / pass-with. Full `schema_test` passes (551 tests). -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
