zhuqi-lucas opened a new pull request, #27785: URL: https://github.com/apache/datafusion/pull/27785
## Which issue does this PR close? - Backport of #27079 to `branch-56`, for #24463. - Closes #27194 for the 56 line. ## Rationale for this change At the default config, 56.0.0 can return wrong rows for an `ORDER BY ... LIMIT` over sorted Parquet files when a filter from above is pushed into a node that holds a fetch (#27194). #27079 fixes this by treating a node with a fetch as a barrier in `PushdownSort` and `FilterPushdown`. The same PR adds the exact reverse scan, behind `datafusion.execution.parquet.enable_exact_reverse_scan` (off by default). The two are hard to separate, since the barrier replaced the scan-specific limit checks the reverse scan relies on, so this backports the PR as merged. ## What changes are included in this PR? A cherry-pick of #27079 (`b43e8e8`) with `-x`. The only conflict was in the generated `configs.md`, which I regenerated with `dev/update_config_docs.sh`. ## What is the testing strategy for this PR? The tests from #27079 pass on this branch: the `datafusion-datasource-parquet` unit tests, the physical optimizer integration tests, `sort_pushdown_exact_reverse.slt` (including the #27194 queries with the option off), and `information_schema.slt`. ## Are there any user-facing changes? - The #27194 queries return correct rows at the default config. Plans can change where a filter used to be pushed below a node with a fetch. - New option `datafusion.execution.parquet.enable_exact_reverse_scan`, default `false`. - Additive API: `FileSource::with_memory_pool` (with a default implementation) and a `reverse_rows` field in the Parquet scan proto. -- 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]
