zhuqi-lucas commented on code in PR #19064:
URL: https://github.com/apache/datafusion/pull/19064#discussion_r2619406888
##########
datafusion/common/src/config.rs:
##########
@@ -837,6 +837,18 @@ config_namespace! {
/// writing out already in-memory data, such as from a cached
/// data frame.
pub maximum_buffered_record_batches_per_stream: usize, default = 2
+
+ /// Enable sort pushdown optimization for Parquet files.
+ /// When enabled, optimizes queries with ORDER BY:
+ /// - Reordering files based on statistics
+ /// - Reversing row group read order when beneficial
+ /// Returns **inexact ordering**: Sort operator is kept for
correctness,
+ /// but can terminate early for TopK queries (ORDER BY ... LIMIT N),
+ /// providing huge speedup.
+ /// Memory: No additional overhead (only changes read order).
+ /// Future TODO: Will add option to support detecting perfectly sorted
data and eliminate Sort completely.
Review Comment:
Good point, changed it to an optimizer option now.
--
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]