mvanhorn opened a new pull request, #26784: URL: https://github.com/apache/datafusion/pull/26784
## Which issue does this PR close? - Refs #26222 ## Rationale for this change Sliding-window SUM and AVG can keep returning NaN after an infinity or NaN has left the frame, even when the remaining values are finite. The accumulators add non-finite values into the running sum and subtract them when they leave. Subtracting infinity from infinity produces NaN, and subsequent updates or retractions cannot recover a finite sum. The non-distinct Float64 sliding accumulators now share a finite sum and separate counts for NaN, positive infinity, and negative infinity. Evaluation uses those counts to return the appropriate non-finite result while those values remain, then returns the finite sum or average once they leave; frames with no non-null values return NULL. The diff adds unit and SQL regression coverage, preserves Arrow summation for all-finite batches, and leaves finite cancellation errors unresolved. Refs #26222. ## What changes are included in this PR? Covered in the summary above. ## What is the testing strategy for this PR? cargo test -q --manifest-path datafusion/functions-aggregate/Cargo.toml -p datafusion-functions-aggregate passed all 274 unit tests and both doctest groups. repo_lint was invoked repeatedly, with no result output recorded. ci/scripts/doc_prettier_check.sh was invoked, with no result output recorded. ci/scripts/rust_fmt.sh was invoked, with no result output recorded. taplo format --check was invoked, with no result output recorded. cargo msrv --output-format json --log-target stdout verify was invoked repeatedly, with no result output recorded. ## Are there any user-facing changes? Covered in the summary above. -- 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]
