alamb commented on code in PR #23824:
URL: https://github.com/apache/datafusion/pull/23824#discussion_r3874251897
##########
datafusion/common/src/config.rs:
##########
@@ -1390,6 +1390,16 @@ config_namespace! {
/// cause regressions in both memory usage and runtime.
pub enable_window_topn: bool, default = false
+ /// When set to true, the optimizer will rewrite a "top-1 per group"
+ /// pattern of the form `Filter(row_number() = 1)` over a `PARTITION
BY` window into an
+ /// `Aggregate(first_value(... ORDER BY ...) GROUP BY partition)`.
+ /// This avoids buffering / fully sorting the input, which is
especially beneficial on wide payloads.
+ /// Disabled by default because on nested/wide value types the
aggregate only becomes memory
+ /// efficient once the columnar nested-type `GroupsAccumulator` fast
+ /// path is available; enabling it without that support can route wide
+ /// payloads onto the slow per-group accumulator path.
+ pub enable_row_number_to_aggregate: bool, default = false
Review Comment:
https://github.com/apache/datafusion/issues/23601 is closed
Do we have a plan to turn this feature on by default? I don't think it will
be very useful the feature remains off by default.
Perhaps we can file a ticket to track what is required to turn it back on by
default
--
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]