Skip to content

Conversation

kosiew
Copy link
Contributor

@kosiew kosiew commented Jun 25, 2025

Which issue does this PR close?

Closes #16542

Rationale for this change

This change modularizes the pruning functionality currently embedded within the core DataFusion codebase. By isolating the pruning logic into its own crate (datafusion-pruning), we enable reuse outside of DataFusion, simplify maintenance, and establish a cleaner architectural separation.

What changes are included in this PR?

  • Extracted PruningPredicate and associated logic from datafusion/physical-optimizer/src/pruning.rs.
  • Created a new crate datafusion/pruning with its own Cargo.toml.
  • Added datafusion-pruning as a dependency in relevant modules.
  • Updated module imports to reference the new crate.
  • Ensured compatibility by maintaining existing interfaces where possible.

Are these changes tested?

Yes, the pruning logic has been transferred along with its test coverage. Additional integration tests will ensure the new crate works as intended within the DataFusion ecosystem.

Are there any user-facing changes?

There are no functional changes for end users. However, developers using or extending pruning logic will now interact with the datafusion-pruning crate instead of internal modules within DataFusion.

@kosiew kosiew added the api change Changes the API exposed to users of the crate label Jun 25, 2025
@github-actions github-actions bot added the optimizer Optimizer rules label Jun 25, 2025
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @kosiew -- this looks great to me

FYI @adriangb

@adriangb
Copy link
Contributor

Sounds good to me!

@alamb alamb merged commit 1b36400 into apache:main Jun 25, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api change Changes the API exposed to users of the crate optimizer Optimizer rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move pruning logic into its own crate
3 participants