datafusion-comet icon indicating copy to clipboard operation
datafusion-comet copied to clipboard

feat: Support ANSI mode avg expr

Open coderfender opened this issue 1 week ago • 4 comments

Which issue does this PR close?

Closes #531

Rationale for this change

Support ANSI eval mode (for integer types) for average expression

What changes are included in this PR ?

  1. Changes to avg implementation to support eval modes
  2. Given that Spark considers Inf as a valid output and doesnt necessarily throw an exception, we follow the same approach in comet as well (essentially making eval mode's redundant for numeric inputs)

How are these changes tested?

coderfender avatar Nov 24 '25 00:11 coderfender

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 59.07%. Comparing base (f09f8af) to head (444ce0e). :warning: Report is 722 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2817      +/-   ##
============================================
+ Coverage     56.12%   59.07%   +2.94%     
- Complexity      976     1459     +483     
============================================
  Files           119      165      +46     
  Lines         11743    15059    +3316     
  Branches       2251     2504     +253     
============================================
+ Hits           6591     8896    +2305     
- Misses         4012     4894     +882     
- Partials       1140     1269     +129     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov-commenter avatar Nov 24 '25 01:11 codecov-commenter

@coderfender You can merge latest from main to fix the current CI failures

andygrove avatar Nov 24 '25 20:11 andygrove

@andygrove , Thank you . I rebased my feature branch with main. Please kick off CI whenever you get a chance . Thank you

coderfender avatar Nov 24 '25 20:11 coderfender

@andygrove , fixed issues with formatting and an unused import. Please kickoff the CI whenever you get a chance . Thank you

coderfender avatar Nov 24 '25 21:11 coderfender