Skip to content

test: refactor key-range bitmap union fuzz test to FuzzTest trait - #27258

Open
Awesome06 wants to merge 1 commit into
apache:mainfrom
Awesome06:refactor-27082-fuzz-key-range-bitmap
Open

Awesome06 wants to merge 1 commit into
apache:mainfrom
Awesome06:refactor-27082-fuzz-key-range-bitmap

Conversation

@Awesome06

Copy link
Copy Markdown

Which issue does this PR close?

Part of #27082.

Rationale for this change

The union_fuzz test in key_range_bitmap.rs previously ran as a standalone #[test] using environment variables (DATAFUSION_KEY_RANGE_UNION_FUZZ_ITERATIONS and DATAFUSION_KEY_RANGE_UNION_FUZZ_SEED) without standardized budget controls or centralized failure reporting.

Migrating this suite to the FuzzTest framework introduced in #27048 makes failures reproducible via seed reporting, connects it to the unified runner in datafusion-fuzz, and aligns it with project-wide fuzz testing conventions.

What changes are included in this PR?

  • datafusion-physical-plan:
    • Expose KeyRangePart and KeyRangeBitmap::union so datafusion-fuzz can construct partitions and test union behavior.
    • Expose offset(&self), span(&self), shift(&self), and bits(&self) getter accessors on KeyRangeBitmap for internal invariant checking.
    • Remove legacy union_fuzz and run_union_scenario test functions from key_range_bitmap.rs.
  • datafusion-fuzz:
    • Implement KeyRangeBitmapFuzzer in tests/suites/key_range_bitmap.rs implementing the FuzzTest trait.
    • Register KeyRangeBitmapFuzzer in tests/fuzz.rs and tests/suites/mod.rs.
  • xtask:
    • Remove union_fuzz from LEGACY_FUZZ_TESTS in ci_steps.rs and clean up legacy runner configuration and snapshots.

What is the testing strategy for this PR?

  • Validated datafusion-physical-plan unit tests:
    • cargo test -p datafusion-physical-plan --lib -- joins::key_range_bitmap (all 4 unit tests pass)
  • Validated unified fuzz runner:
    • cargo test -p datafusion-fuzz --test fuzz --features extended_tests (256 cases pass)
  • Validated xtask legacy fuzz test verification:
    • cargo test -p datafusion-xtask -- legacy_fuzz_tests_exist

Are there any user-facing changes?

No user-facing changes.

@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Nov 9, 2026

@jayzhan211 jayzhan211 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Awesome06 thanks for picking this up! Two small asks inline: keep this suite's 10,000-case CI budget, and mark the newly public items #[doc(hidden)] per the API policy.

Comment thread datafusion/fuzz/tests/fuzz.rs Resolved
@Awesome06
Awesome06 force-pushed the refactor-27082-fuzz-key-range-bitmap branch from 8df4e3a to d41e729 Compare November 11, 2026 15:16
Refactor the legacy union_fuzz test in key_range_bitmap.rs into a reproducible FuzzTest suite managed by the centralized driver in datafusion-fuzz, as part of apache#27082.

- Expose KeyRangePart and KeyRangeBitmap::union with #[doc(hidden)] for fuzz testing
- Add hidden offset, span, shift, and bits accessors on KeyRangeBitmap
- Implement KeyRangeBitmapFuzzer in datafusion/fuzz/tests/suites/key_range_bitmap.rs
- Register KeyRangeBitmapFuzzer in datafusion/fuzz/tests/fuzz.rs with 10,000 cases
- Remove legacy union_fuzz and run_union_scenario from key_range_bitmap.rs
- Update xtask LEGACY_FUZZ_TESTS and remove union_fuzz runner configuration
@Awesome06
Awesome06 force-pushed the refactor-27082-fuzz-key-range-bitmap branch from d41e729 to 865cbd6 Compare November 11, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants