Skip to content

Conversation

@coderfender
Copy link
Contributor

@coderfender coderfender commented Oct 17, 2025

Which issue does this PR close?

Closes #531 .
(Partially closes 531) . The ANSI changes to support AVG will be tracked in a new PR

Rationale for this change

What changes are included in this PR?

  1. Implement native support for SUM function (for integer types only since spark checks overflow for integer types only)
  2. Change proto schema to pass along eval_mode instead of fail_on_error to support Legacy, ANSI and Try mode impl
  3. Implement sum_int.rs leveraging custom UDAF with groups accumulator which sums int types and throw arithmetic overflow exception / return null based on Eval Mode.
    (Note that Spark excpects sum and is_null ignore sum value and return null in Try eval mode)
  4. Unit tests to test overfow / underflow , null results for sum, try_sum in all Eval modes

How are these changes tested?

@coderfender coderfender marked this pull request as draft October 17, 2025 19:13
@coderfender
Copy link
Contributor Author

Draft PR to support sum function - WIP

@coderfender coderfender marked this pull request as ready for review October 28, 2025 07:53
@coderfender coderfender changed the title [WIP]: Support ANSI mode sum expr feat: Support ANSI mode sum expr Oct 29, 2025
@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.96%. Comparing base (f09f8af) to head (4bbe21a).
⚠️ Report is 649 commits behind head on main.

Additional details and impacted files
@@              Coverage Diff              @@
##               main    #2600       +/-   ##
=============================================
- Coverage     56.12%   45.96%   -10.16%     
- Complexity      976     1201      +225     
=============================================
  Files           119      147       +28     
  Lines         11743    13746     +2003     
  Branches       2251     2361      +110     
=============================================
- Hits           6591     6319      -272     
- Misses         4012     6388     +2376     
+ Partials       1140     1039      -101     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ANSI support in SUM and AVG

2 participants