Skip to content

Move EnforceSorting into datafusion-physical-optimizer crate #14185

@alamb

Description

@alamb

Is your feature request related to a problem or challenge?

Historically DataFusion was one (very) large crate datafusion, and as it grew bigger we extracted various functionality into separate crates. This leads to both faster compile times (as the crates can be compiled in parallel) as well easier to navigate code (as the crates force a cleaner dependency separation)

One project we have not yet completed is to extract the physical optimizer passes out #11502

Describe the solution you'd like

Extract the ProjectionPushdown from the datafusion core crate to the datafusion-physical-optimizer crate

Describe alternatives you've considered

Move the code

I believe you will have to move two other modules:

I would recomend the following structure:

datafusion/physical-optimizer/src/enforce_sorting/mod.rs (old enforce_sorting.rs)
datafusion/physical-optimizer/src/enforce_sorting/replace_with_order_preserving_variants.rs 
datafusion/physical-optimizer/src/enforce_sorting/sort_pushdown.rs 

Notes that due to dependencies (e.g. on SessionContext or functions), you may have to move the tests into the core_integration tests here:

Additional context

Here are some example PRs

I think this is likely not a good first issue as it will invovle substantial code

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions