Repository navigation
Conversation
The list converter treated a pyarrow ListScalar as a Python sequence and called len() on it, which fails for a null scalar. Append Arrow scalars directly, as the other converters already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nil68657
requested review from
AlenkaF,
pitrou,
raulcd and
rok
as code owners
October 11, 2026 21:34
|
|
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
The list converter treated a pyarrow ListScalar as a Python sequence and
called len() on it, which fails for a null scalar. Append Arrow scalars
directly, as the other converters already do.
What changes are included in this PR?
python/pyarrow/src/arrow/python/python_to_arrow.ccAre these changes tested?
Yes. A regression test in
python/pyarrow/tests/test_convert_builtin.pyfails without the change and passes with it; the surrounding test module/binary passes.Are there any user-facing changes?
See the rationale above.
Was AI used for this PR?
This PR is a joint contribution from Nilanjan Chatterjee (@nil68657) and Claude (Claude Opus 5.5, via Claude Code). Nilanjan chose the issue and directed the work; Claude reproduced the bug, wrote the fix, the test and this description.
PR code and description written by:
Reviewed before submission by: