dragonknightk opened a new pull request, #516: URL: https://github.com/apache/arrow-dotnet/pull/516
## What's Changed `ArrowArrayConcatenator.Concatenate` checked only the type id and buffer count before concatenating struct arrays. It then combined the children by position and typed the result with the first input's `StructType`, so mismatched fields were dropped, mislabeled, or silently swapped. Now `Concatenate` throws `ArgumentException` when the struct inputs differ in field count, name, order or nullability, the same way it already does for `FixedSizeList` sizes and decimal scales. The check runs for every struct level, so structs nested in lists and other structs are covered. Child types are still checked when the children are concatenated. Field metadata is not compared. A map's entries struct is still not checked for field names or nullability, so maps that differ only there still concatenate. A struct inside a map value is checked like any other struct. Union arrays follow the same pattern and are not changed here. The new tests cover each kind of mismatch above, a third input that differs from the first two, and a mismatch in a struct nested in a list. Maps whose value nullability differs still concatenate, and maps whose value structs differ in field names are rejected. The mismatch cases fail on the old code. Closes #500. ## AI Disclosure Human-led contribution. Grok Bot, working for dragonknightk, assisted with this change, including the code, tests, and description. All submitted content was reviewed by a human before submission. -- 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]
