-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Python] StructArray.sort() errors with default arguments #41464
Comments
a-reich
changed the title
StructArray.sort() errors with default arguments
[Python] StructArray.sort() errors with default arguments
Apr 30, 2024
@a-reich Thanks for the report, a PR is certainly welcome! |
As per how to build and test, If you add a test that reproduces the issue it can be tested on CI. |
a-reich
added a commit
to a-reich/arrow
that referenced
this issue
May 2, 2024
take |
jorisvandenbossche
pushed a commit
that referenced
this issue
May 14, 2024
### Rationale for this change Closes issue #41464. Fix `StructArray.sort` method's `by` param to work in the case of `by=None` which was documented to mean sort by all fields (the default), but would raise an exception. ### What changes are included in this PR? * Add a unit test with by=None in `test_struct_array_sort` that fails on main * Fix the sort method ### Are these changes tested? yes ### Are there any user-facing changes? yes * GitHub Issue: #41464 Authored-by: a-reich <[email protected]> Signed-off-by: Joris Van den Bossche <[email protected]>
Issue resolved by pull request 41495 |
vibhatha
pushed a commit
to vibhatha/arrow
that referenced
this issue
May 25, 2024
…1495) ### Rationale for this change Closes issue apache#41464. Fix `StructArray.sort` method's `by` param to work in the case of `by=None` which was documented to mean sort by all fields (the default), but would raise an exception. ### What changes are included in this PR? * Add a unit test with by=None in `test_struct_array_sort` that fails on main * Fix the sort method ### Are these changes tested? yes ### Are there any user-facing changes? yes * GitHub Issue: apache#41464 Authored-by: a-reich <[email protected]> Signed-off-by: Joris Van den Bossche <[email protected]>
JerAguilon
pushed a commit
to JerAguilon/arrow
that referenced
this issue
May 29, 2024
…1495) ### Rationale for this change Closes issue apache#41464. Fix `StructArray.sort` method's `by` param to work in the case of `by=None` which was documented to mean sort by all fields (the default), but would raise an exception. ### What changes are included in this PR? * Add a unit test with by=None in `test_struct_array_sort` that fails on main * Fix the sort method ### Are these changes tested? yes ### Are there any user-facing changes? yes * GitHub Issue: apache#41464 Authored-by: a-reich <[email protected]> Signed-off-by: Joris Van den Bossche <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug, including details regarding any error messages, version, and platform.
StructArray's sort method is documented to have the parameter
by: str or None, default None
, however a simple example that leaves the argument as None raises:I am running pyarrow 16.0.0, Python 3.12, on Windows WSL.
I think the cause is a simple mistake in this line?
arrow/python/pyarrow/array.pxi
Line 3973 in b609de3
I can send a basic PR with that fix and a test soon. But I'm not sure if I'll be able to build & test locally. Thanks!
Component(s)
Python
The text was updated successfully, but these errors were encountered: