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

   ## Which issue does this PR close?
   
   - N/A.
   
   ## Rationale for this change
   
   Cache valid row positions for nth_value window evaluation with IGNORE NULLS 
to avoid rescanning validity bitmaps for each frame.
   
   ## What changes are included in this PR?
   
   - Add a lazy per-evaluator valid-index cache for nth_value IGNORE NULLS 
evaluation.
   - Reuse cached non-null row positions across frame evaluations.
   - Add regression tests for cached ranges including backward and 
empty-valid-row ranges.
   
   ## Are these changes tested?
   
   - cargo fmt --all
   - cargo clippy --all-targets --all-features -- -D warnings
   - cargo test -p datafusion-functions-window nth_value --lib
   - cargo bench -p datafusion-functions-window --bench nth_value -- 
nth_value_ignore_nulls/last_value_expanding/50% --sample-size 10 --warm-up-time 
1 --measurement-time 2
   
   Benchmark median: 260.09 us. Original baseline: 14.239 ms.
   
   ## Are there any user-facing changes?
   
   No API or behavior changes; performance improvement only.


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