Repository navigation
Conversation
lll-hhh
requested review from
AlenkaF,
pitrou,
raulcd and
rok
as code owners
November 22, 2026 06:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Fixes #44643.
When a Python struct row is converted, its child builders are appended one at a time. If a later child returns
CapacityError, earlier children may already contain part of that row. The chunker then finishes the current chunk, andMapBuilder::FinishInternalaborts because the key and item builders have different lengths.What changes are included in this PR?
PyStructConverterrecover from a childCapacityErrorby backfilling any missing child values and the struct parent. This leaves a complete placeholder row for the chunker to slice away.Chunkerfrom retrying when no logical rows were committed to the current chunk.PyMemoryView_GetContiguous()so a temporary memoryview/mmap can be released after conversion.Are these changes tested?
Yes, against an editable Arrow C++/PyArrow build in WSL:
3 passed.python -m pytest -q pyarrow/tests/test_convert_builtin.py:612 passed, 72 skipped, 2 xfailed.clang-format==18.1.8 --dry-run --Werrorpassed on all modified C++ files.Are there any user-facing changes?
No API changes. Oversized map/struct conversions now either split into chunks or raise
ArrowCapacityErrorinstead of aborting the Python process.This PR contains a "Critical Fix". This fixes a process-wide SIGABRT on an API-contract-valid input path.
Was AI used for this PR?
In accordance to the AI generation guidelines, AI was used for implementation and tests. The change was reproduced, debugged, reviewed, and validated against a local Arrow build before submission.
PR code and description written by:
Reviewed before submission by: