scovich opened a new pull request, #8172: URL: https://github.com/apache/arrow-rs/pull/8172
# Which issue does this PR close? - Part of https://github.com/apache/arrow-rs/issues/8171 - Related to https://github.com/apache/arrow-rs/issues/8170 # Rationale for this change It's cleaner to report duplicate field names immediately, rather than doing extra work to collect them and wait for `finish` before reporting the error. # What changes are included in this PR? Remove the duplicate field set from the object builder and report the error directly instead. NOTE: This does _not_ fix the existing bug that sub-list and sub-object builders did not even attempt to check for duplicates. Upcoming changes to harmonize builder rollback will fix that as a side effect. # Are these changes tested? Yes, updated unit tests show the new behavior (and expose the pre-existing bug that will be fixed later) # Are there any user-facing changes? `ObjectBuilder::try_insert` and `ObjectBuilder::try_with_field` now return errors on duplicate (they were already fallible methods). Their infallible counterparts will now panic in case of a duplicate. -- 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]
