Skip to content

branch-4.1: [Bug](function) add ndv decimalv2 support #61546#61578

Merged
yiguolei merged 1 commit intobranch-4.1from
auto-pick-61546-branch-4.1
Mar 20, 2026
Merged

branch-4.1: [Bug](function) add ndv decimalv2 support #61546#61578
yiguolei merged 1 commit intobranch-4.1from
auto-pick-61546-branch-4.1

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #61546

This pull request focuses on improving support for the `DECIMALV2` data
type in aggregate functions and updating related regression tests to
ensure correctness. The most important changes are grouped below:

### Aggregate Function Support

* Added `TYPE_DECIMALV2` to the supported types for the
`approx_count_distinct` aggregate function in
`aggregate_function_approx_count_distinct.cpp`, enabling this function
to work with `DECIMALV2` columns.

### Regression Test Enhancements

* Updated the output in `test_decimalv2.out` to reflect higher precision
for `DECIMALV2` values, showing results with more decimal places to
match the new behavior.
* Added a new test case in `test_decimalv2.groovy` to verify the correct
behavior of the `ndv` (number of distinct values) aggregate function on
`DECIMALV2` columns.
@github-actions github-actions bot requested a review from yiguolei as a code owner March 20, 2026 10:15
@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring reopened this Mar 20, 2026
@hello-stephen
Copy link
Contributor

run buildall

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 0.00% (0/3) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.60% (19432/36943)
Line Coverage 36.07% (181487/503174)
Region Coverage 32.53% (140379/431549)
Branch Coverage 33.50% (61274/182890)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (3/3) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.04% (25689/36163)
Line Coverage 53.93% (270499/501531)
Region Coverage 51.48% (224228/435587)
Branch Coverage 52.79% (96848/183458)

@yiguolei yiguolei merged commit 360a919 into branch-4.1 Mar 20, 2026
27 of 29 checks passed
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.

4 participants