AvgPrecision aggregation function
This pr adds the support to perform average with fixed precision.
SELECT AVGPRECISION(colA, precision, scale, roundingmode) FROM table
SELECT AVGPRECISION(colA, precision, scale) FROM table
SELECT AVGPRECISION(colA, precision) FROM table
SELECT AVGPRECISION(colA) FROM table
RoundingModes: https://docs.oracle.com/javase/8/docs/api/java/math/RoundingMode.html
- UP
- DOWN
- CEILING
- FLOOR
- HALF_UP
- HALF_DOWN
- HALF_EVEN (DEFAULT)
- UNNECESSARY
Additional context: https://github.com/apache/pinot/issues/17095
@yashmayya please review
@yashmayya @xiangfu0 @Jackie-Jiang could you please review the pr ?
Thanks for the PR @anilsomisetty, I'll take a look soon.
Codecov Report
:x: Patch coverage is 84.32203% with 37 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 63.29%. Comparing base (d78b39b) to head (31f01c0).
:warning: Report is 16 commits behind head on master.
:white_check_mark: All tests successful. No failed tests found.
Additional details and impacted files
@@ Coverage Diff @@
## master #17279 +/- ##
============================================
+ Coverage 63.24% 63.29% +0.05%
- Complexity 1432 1434 +2
============================================
Files 3133 3135 +2
Lines 185904 186314 +410
Branches 28401 28444 +43
============================================
+ Hits 117568 117921 +353
- Misses 59277 59309 +32
- Partials 9059 9084 +25
| Flag | Coverage Δ | |
|---|---|---|
| custom-integration1 | 100.00% <ø> (ø) |
|
| integration | 100.00% <ø> (ø) |
|
| integration1 | 100.00% <ø> (ø) |
|
| integration2 | 0.00% <ø> (ø) |
|
| java-11 | 63.25% <84.32%> (+0.08%) |
:arrow_up: |
| java-21 | 63.23% <84.32%> (+0.03%) |
:arrow_up: |
| temurin | 63.29% <84.32%> (+0.05%) |
:arrow_up: |
| unittests | 63.28% <84.32%> (+0.05%) |
:arrow_up: |
| unittests1 | 55.68% <80.50%> (+0.06%) |
:arrow_up: |
| unittests2 | 33.87% <11.86%> (-0.04%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.