osipovartem opened a new pull request, #26160:
URL: https://github.com/apache/datafusion/pull/26160

   ## What changes
   
   - Recognize `rank_col = 1` and `1 = rank_col` in the opt-in WindowTopN rule. 
Other equalities remain untouched.
   - Add physical-plan and result regressions for ROW_NUMBER, RANK (including 
ties), and DENSE_RANK. Preserve the existing sibling-window safety guard.
   - Leave `enable_window_topn` disabled by default.
   
   ## Validation
   
   - `cargo +stable test --profile ci -p datafusion-sqllogictest --test 
sqllogictests -- window_topn.slt --test-threads 1`
   - `cargo +stable test --profile ci -p datafusion-physical-optimizer --lib` 
(38 passed)
   - `cargo +stable clippy --profile ci -p datafusion-physical-optimizer 
--all-targets -- -D warnings`
   - `cargo +stable fmt --all --check`
   - Independent read-only review approved correctness, regressions, 
performance, API compatibility, and tests.
   
   ## Performance scope
   
   Five local synthetic 100k-row runs (median query elapsed): 100 groups, rule 
off/on 31/18 ms; 90k groups, rule off/on 120/140 ms. High-cardinality plans can 
regress, which is why this remains opt-in. These numbers are not a Snowplow 
benchmark. A pushed-down FilterExec projection can also prevent this rewrite. 
This PR does not change either behavior.
   


-- 
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]

Reply via email to