You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "saadtajwar (via GitHub)" <gi...@apache.org> on 2026/08/28 17:28:08 UTC
[I] Enable `enable_row_number_to_aggregate` by default [datafusion]
saadtajwar opened a new issue, #24761:
URL: https://github.com/apache/datafusion/issues/24761
### Is your feature request related to a problem or challenge?
In PR #23824, `ReplaceFilterTop1` rewrites `Filter(row_number() = 1)` over a `PARTITION BY` window into `Aggregate(first_value(...) GROUP BY partition)`. The rewrite is currently behind the config `optimizer.enable_row_number_to_aggregate`, which currently defaults to false - this was originally due to #23601 not being merged in yet, but as #23601 is now closed out it would be helpful for this to be enabled by default
### Describe the solution you'd like
To flip `enable_row_number_to_aggregate` to true:
- Confirm nested/wide types no longer hit the per-group Accumulator path, and measure the remaining GenericValueState cost vs primitives.
- Benchmark Window+Filter vs the rewritten Aggregate across partition cardinality, payload width, and value types (primitive, string, nested)
- Confirm there are no remaining correctness gaps for the rewrite
- If results look good, set the default to true, drop the "disabled by default" note in `config.rs`, and regenerate `docs/source/user-guide/configs.md` plus `information_schema.slt`.
### Describe alternatives you've considered
Keep off by default (wouldn't be very useful for optimization)
### Additional context
See original issue: #23603 & original PR: #23824 & associated epic: #23600
--
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: github-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Enable `enable_row_number_to_aggregate` by default [datafusion]
Posted by "saadtajwar (via GitHub)" <gi...@apache.org>.
saadtajwar commented on issue #24761:
URL: https://github.com/apache/datafusion/issues/24761#issuecomment-5455642533
take
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org