Skip to content

Refactor binary.rs tests into modular submodules under binary/tests #16782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 20, 2025

Conversation

kosiew
Copy link
Contributor

@kosiew kosiew commented Jul 15, 2025

Which issue does this PR close?

Rationale for this change

This refactor improves the organization and maintainability of the type coercion tests in the datafusion/expr-common crate.
By grouping related tests into separate modules (arithmetic.rs, comparison.rs, dictionary.rs, null_coercion.rs), it makes the test suite easier to navigate, extend, and review.

What changes are included in this PR?

  • Moved all existing tests from binary.rs into dedicated submodules under binary/tests/
    • arithmetic.rs — arithmetic coercion and numeric tests
    • comparison.rs — comparison, like, binary ops, map and list coercion tests
    • dictionary.rs — dictionary coercion tests
    • null_coercion.rs — logical ops and null coercion tests
  • Extracted common test macros into tests/mod.rs
  • Ensured no test coverage was dropped during the move

Are these changes tested?

✅ Yes — This PR only reorganizes existing, already tested code.
All tests continue to run under the new module structure.

Are there any user-facing changes?

❌ No — This is an internal refactor of test code only.
There are no changes to user-facing APIs or behavior.

move test module into binary/tests hierarchy
split tests into arithmetic, comparison, null, and dictionary modules
@github-actions github-actions bot added development-process Related to development process of DataFusion logical-expr Logical plan and expressions labels Jul 15, 2025
@github-actions github-actions bot removed the development-process Related to development process of DataFusion label Jul 15, 2025
@kosiew kosiew changed the title Refactor binary type coercion tests into modular submodules under binary/tests Refactor binary.rs tests into modular submodules under binary/tests Jul 15, 2025
Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

Thanks @kosiew I think it makes sense to split the huge file up

@comphead comphead merged commit eb25e8d into apache:main Jul 20, 2025
27 checks passed
@kosiew
Copy link
Contributor Author

kosiew commented Jul 21, 2025

thanks @comphead for your review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logical-expr Logical plan and expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restructure binary.rs Tests into Dedicated Modules
2 participants