Repository navigation
test(arrow-ord): refactor sorting tests with rstest - #12435
Closed
Phoenix500526 wants to merge 2 commits into
Closed
Phoenix500526 wants to merge 2 commits into
Phoenix500526 wants to merge 2 commits into
Conversation
Enable parameterized tests with individually reported cases. Refs apache#12328
Make sorting scenarios independently identifiable while retaining existing inputs, expected results, and Miri exclusions. Refs apache#12328
This was referenced Nov 24, 2026
Contributor
Author
|
Closed temporarily |
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.
Which issue does this PR close?
Part of #12434 and #12328. This is the sorting portion of the
arrow-ordrefactor; the comparison and ranking changes are in #12436. Neither PR closes #12434 on its own.Rationale for this change
Sorting tests repeat setup and assertions across types, null placement, sort direction, and limit boundaries. Named
rstestcases make individual failures easier to locate and rerun while reducing duplicated test bodies.What changes are included in this PR?
rstestas a dev dependency, using a shared workspace declaration with default features disabled.sort.rs.Keep the original inputs, expected results, precision/scale settings, default and explicit sort options, limits, and Miri exclusions. Shared randomized tests remain unchanged. The pre-existing repeated Int16 scenario is retained.
Are these changes tested?
The refactored cases were checked against the original inputs and assertions, including nulls, NaN, Decimal256 extrema, and partial sorting. The
arrow-ordall-features unit and documentation tests pass on this branch independently. Miri ignore propagation was checked in macro-expanded tests; Miri itself was not run.Are there any significant user-facing changes?
No. Production code and public APIs are unchanged.
AI usage disclosure
I worked through the candidate tests with Codex in an iterative, test-by-test discussion. I chose which groups to refactor, reviewed the proposed case groupings and diffs, questioned coverage and helper structure, requested that single-use helpers be inlined, and decided how to split the work into independent PRs. Codex assisted with implementation, before/after coverage checks, Miri attribute checks, and local validation. I reviewed the scope and design decisions throughout the process.