-
Notifications
You must be signed in to change notification settings - Fork 4.3k
[Python] Fix deprecation warnings for RankOptions null_placement in our own tests #51300
Open
Assignees
Labels
Description
In the test logs on CI, I see:
opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/tests/test_compute.py::test_option_class_equality
/opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/tests/test_compute.py:175: FutureWarning: Specifying null_placement in RankOptions is deprecated as of 25.0.0. Specify null_placement per sort_key instead.
pc.RankOptions(sort_keys="ascending",
opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/tests/test_compute.py::test_option_class_equality
/opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/tests/test_compute.py:177: FutureWarning: Specifying null_placement in RankOptions is deprecated as of 25.0.0. Specify null_placement per sort_key instead.
pc.RankQuantileOptions(sort_keys="ascending",
opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/tests/test_compute.py::test_rank_options_tiebreaker[min-expected_values0]
opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/tests/test_compute.py::test_rank_options_tiebreaker[max-expected_values1]
opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/tests/test_compute.py::test_rank_options_tiebreaker[first-expected_values2]
opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/tests/test_compute.py::test_rank_options_tiebreaker[dense-expected_values3]
/opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/tests/test_compute.py:3885: FutureWarning: Specifying null_placement in RankOptions is deprecated as of 25.0.0. Specify null_placement per sort_key instead.
rank_options = pc.RankOptions(sort_keys="ascending",
opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/tests/test_compute.py::test_rank_options
opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/tests/test_compute.py::test_rank_quantile_options
opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/tests/test_compute.py::test_rank_normal_options
/opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/compute.py:230: FutureWarning: Specifying null_placement in RankOptions is deprecated as of 25.0.0. Specify null_placement per sort_key instead.
return options_class(*args, **kwargs)
opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/tests/test_compute.py::test_rank_options
/opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/tests/test_compute.py:3921: FutureWarning: Specifying null_placement in RankOptions is deprecated as of 25.0.0. Specify null_placement per sort_key instead.
pc.RankOptions(sort_keys="descending",
opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/tests/test_compute.py::test_rank_normal_options
/opt/conda/envs/arrow/lib/python3.14/site-packages/pyarrow/tests/test_compute.py:3975: FutureWarning: Specifying null_placement in RankOptions is deprecated as of 25.0.0. Specify null_placement per sort_key instead.
options=pc.RankQuantileOptions(null_placement="at_start",
Those warnings should not appear in our own tests (either update the tests to use the new pattern, or explicitly assert that the warning is happening)