zhuqi-lucas opened a new issue, #21433: URL: https://github.com/apache/datafusion/issues/21433
**Is your feature request related to a problem or challenge?** `FileScanConfig` in `datafusion/datasource/src/file_scan_config.rs` has grown large after the sort pushdown optimization (#21182) added statistics-based file sorting, non-overlapping validation, and NULL handling logic. As noted by @alamb in https://github.com/apache/datafusion/pull/21182#discussion_r3039838330: > As a follow on PR it might be nice to figure out how to move some of this code out of FileScanConfig and into some other smaller module **Describe the solution you'd like** Extract sort pushdown related code from `FileScanConfig` into a dedicated module, e.g. `datafusion/datasource/src/sort_pushdown.rs`: - `try_pushdown_sort()` - `rebuild_with_source()` - `try_sort_file_groups_by_statistics()` - `sort_files_within_groups_by_statistics()` - `any_file_has_nulls_in_sort_columns()` - Related helper functions and types (`SortedFileGroups`, etc.) This is a pure refactor — no behavior changes. **Related issues:** - #17348 — Parent issue: sort pushdown optimization - #21182 — Sort pushdown phase 1 (where the code was added) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
