Skip to content

refactor: parameterize IPC, Flight, and Row tests - #12357

Closed
Phoenix500526 wants to merge 2 commits into
apache:mainfrom
Phoenix500526:issue/12328-II-arrow-flight
Closed

Phoenix500526 wants to merge 2 commits into
apache:mainfrom
Phoenix500526:issue/12328-II-arrow-flight

Conversation

@Phoenix500526

@Phoenix500526 Phoenix500526 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Part of #12328.

Rationale for this change

Several IPC, Flight, and Row tests repeat setup and assertions across input variants or nest independent scenarios in loops. Named rstest cases make these scenarios easier to read and identify when a test fails.

What changes are included in this PR?

  • Parameterize IPC union slicing, dictionary union round trips, empty offset buffers, and alignment tests. Keep all 128 byte offsets within each alignment case so each array is encoded only once.
  • Parameterize Flight schema round trips, dictionary known_schema behavior, table metadata filtering, and CLI table queries. Preserve the default hydration path, explicit resend configuration, and independent server setup for each CLI case.
  • Parameterize Row run-end encoded round trips and sorting, Decimal conversion, invalid empty/truncated inputs, and iterator nth/nth_back tests. Preserve type-specific Decimal256 inputs, ordering assertions, and repeated iterator consumption.
  • Add rstest as a development dependency of arrow-ipc, arrow-flight, and arrow-row.

Are these changes tested?

The refactored tests preserve existing inputs, parameter combinations, and assertions, including complete CLI output and alignment errors, Decimal256 values, invalid-input panic expectations, and iterator exhaustion checks. IPC and Flight unit, integration, and documentation suites were verified locally with IPC compression and Flight SQL/CLI/TLS features enabled. Row unit and documentation tests also pass.

Are there any significant user-facing changes?

No. These changes affect tests only.

AI usage disclosure

I worked through the proposed test groups with Codex and selected which refactors to include. I also edited tests myself, discussed case names and test structure, and requested coverage reviews before committing. These decisions included retaining distinct null-ordering behavior and the original input differences.

Codex helped identify candidates, draft and revise the refactoring, cross-check coverage, run validation commands, and prepare the PR description.

@boring-cyborg boring-cyborg Bot added arrow-flight arrow-flight crate arrow-ipc arrow-ipc crate labels Nov 20, 2026
@Phoenix500526
Phoenix500526 force-pushed the issue/12328-II-arrow-flight branch from 6b9e1eb to c18a5ab Compare November 20, 2026 11:53
@boring-cyborg boring-cyborg Bot added the arrow-row arrow-row crate label Nov 20, 2026
Reduce duplicated test setup and assertions while preserving
coverage of IPC formats, alignment, and Flight SQL behavior.

Refs apache#12328
Reduce duplicated row conversion and iterator tests while
preserving type coverage, ordering checks, and invalid inputs.

Refs apache#12328
@Phoenix500526
Phoenix500526 force-pushed the issue/12328-II-arrow-flight branch from 6dfc8a2 to 8a7d76f Compare November 20, 2026 11:55
@Phoenix500526 Phoenix500526 changed the title refactor: parameterize IPC and Flight tests refactor: parameterize IPC, Flight, and Row tests Nov 20, 2026
@Phoenix500526

Copy link
Copy Markdown
Contributor Author

I'll temporarily close the other rstest PRs and reopen them in smaller batches after #12354 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow-flight arrow-flight crate arrow-ipc arrow-ipc crate arrow-row arrow-row crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor arrow-row tests with rstest Refactor arrow-flight tests with rstest Refactor arrow-ipc tests with rstest

1 participant