andygrove opened a new pull request, #7514:
URL: https://github.com/apache/datafusion-comet/pull/7514

   ## Which issue does this PR close?
   
   Backport of #6069 to `branch-1.2`. Closes #6043 on this branch.
   
   ## Rationale for this change
   
   Native sliding integer `sum` wraps on overflow instead of matching Spark: 
ANSI `sum` should throw, `try_sum` should return NULL, and the sum should 
recover once overflowing values leave the frame (#6043, a critical bug). 
`branch-1.2` has the same native window path. See #6069 for the full analysis.
   
   ## What changes are included in this PR?
   
   Cherry-pick of 897f257149 (`git cherry-pick -x`) with no conflicts and no 
adaptations. The diff against the source commit is identical apart from line 
numbers and blob hashes. It adds a retractable ANSI/TRY integer SUM 
accumulator, adjusts the window planner, and includes the source PR's SQL file 
test, `CometWindowExecSuite` tests, window-function audit note and 
`CometSlidingSumBenchmark`.
   
   Other release branches: `branch-1.2` is the newest release branch, so there 
is no newer one to port to. Whether `branch-1.1` needs a backport is not part 
of this PR.
   
   ## How are these changes tested?
   
   On this branch, with JDK 17: the 17 `sum_int` Rust unit tests pass. 
`CometWindowExecSuite` and the `windows/sliding_integer_sum.sql` file test pass 
against a native library built from this branch (86 tests, 0 failures). With 
`window.rs` and `sum_int.rs` reverted to `branch-1.2`'s version, 
`sliding_integer_sum.sql` and the two `sliding integral ROWS sums` tests (ANSI 
on and off) fail, so the branch has the bug and the tests catch it. I ran the 
default Spark profile 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