CurtHagenlocher opened a new pull request, #535: URL: https://github.com/apache/arrow-dotnet/pull/535
### What's changed `VariantReader.ToVariantValue`, `VariantMetadataBuilder.CollectFieldNames`, `VariantValueWriter.CopyValue` and `VariantJsonWriter.ToJson`/`WriteTo` visit every nested value. They now check the value first and throw `InvalidDataException` if it is malformed: - Objects and arrays may be nested at most 128 deep. The spec sets no limit; this is in line with other Arrow implementations and well above the 64 levels `System.Text.Json` reads by default. - The values of an object's fields must lie inside the object and must not overlap. They may still appear in any order, and with gaps between them, as the spec allows. - Array element offsets must be in order and inside the array. An empty object or array that omits its single offset is still accepted, as before. The check is internal for now. A public way to change the limit could come later. ### Testing New tests in `VariantValidatorTests` and `VariantJsonValidationTests` cover: - nesting at the limit and past it - fields that share or overlap values - values stored out of field order or with gaps between them - offsets outside the object or array - objects with more than 32 fields The parquet-testing conformance vectors, all written by Spark, pass the new check. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🤖 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]
