Repository navigation
test(arrow-ord): refactor comparison and rank tests - #12436
Phoenix500526 wants to merge 2 commits into
Conversation
Enable parameterized tests with individually reported cases. Refs apache#12328
Reduce repeated test setup and make failures identify their cases. Preserve existing comparison coverage and Miri exclusions. Refs apache#12328
|
@Phoenix500526 could i ask you to close some of your PRs? you currently have 23 (!) PRs open, and even though only 3 of them are non-draft, this is a substantial amount to have open at one time and it looks like spam. could you reduce to a more manageable number so we know which to focus on? for example, the |
Sure. Sorry for overwhelming the review queue. I had been using draft PRs to queue follow-up work, but I understand that having so many open makes it harder to prioritize reviews. I'll close the other rstest PRs and keep #12354 as the one to focus on. Once that lands, I'll apply the feedback to the remaining work and reopen it in smaller batches. I'll also review my other open PRs to reduce the overall number. |
Which issue does this PR close?
Part of #12434 and #12328. This is the comparison and ranking portion of the
arrow-ordrefactor; the sorting changes are in #12435. Neither PR closes #12434 on its own.Rationale for this change
Comparison and ranking tests repeat setup and assertions for operators, array types, and sort options. Named
rstestcases make each scenario easier to identify and run while sharing the repeated test body.What changes are included in this PR?
rstestas a dev dependency, using the same small dependency commit as the sorting PR.comparison.rsandcmp.rs.rank.rs, keeping nonzero null-payload checks separate and retaining inline-view buffer assertions.Preserve scalar/array distinctions, dictionary key types, both comparison directions where originally tested, exact expected results, and Miri exclusions. The pre-existing missing millisecond Timestamp case is left for a separate change.
Are these changes tested?
Before/after tracing matched all 531 comparison calls in
comparison.rs, including operators, scalar flags, types, null bitmaps, and underlying buffer data. Ranking and REE scenarios were checked against the original assertions. Thearrow-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 selected the groups to refactor, reviewed the proposed parameterization and diffs, discussed generic types and coverage, and explicitly kept the Timestamp coverage gap separate. I also chose the commit and PR split. Codex assisted with implementation, before/after coverage checks, Miri attribute checks, and local validation. I reviewed scope and design decisions throughout the process.