Repository navigation
Conversation
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
fill_null_forwardandfill_null_backwardacceptpyarrow.Scalarinputs through their Python wrappers, but currently return a one-element Array. On current main this path can also materialize the wrong value. A scalar has no null slots to fill, so it should be returned unchanged.What changes are included in this PR?
The Python wrappers return scalar inputs unchanged and keep the existing C++ path for arrays and chunked arrays. The regression test covers numeric and null scalars for both forward and backward fill.
Are these changes tested?
fill_null_forward(pa.scalar(5))returnedInt64Array [5]instead of a scalar.python -m compileallpassed for the changed files.PYI024namedtuple warnings ignored.git diff --checkpassed.pyarrow.libextension.Are there any user-facing changes?
Yes. Scalar inputs now return the unchanged
pyarrow.Scalar; array and chunked-array behavior is unchanged.Was AI used for this PR?
AI was used to prepare the initial patch and regression tests. The change was checked against the issue reproduction and the available local validation before submission.
PR code and description written by:
Reviewed before submission by: