HappenLee opened a new pull request, #64774:
URL: https://github.com/apache/doris/pull/64774
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Add single-argument MAP aggregate functions sum_map,
avg_map, min_map, max_map, and count_map. These functions aggregate values
independently for each map key and return a MAP. The backend implementation
wraps the existing aggregate function state per key so partial and final
aggregation preserve nested aggregate semantics, including avg state merging.
sum_map and avg_map require numeric map values; min_map, max_map, and count_map
support non-numeric map values, and count_map counts non-null values per key.
### Release note
Add sum_map, avg_map, min_map, max_map, and count_map aggregate functions
for MAP values.
### Check List (For Author)
- Test:
- Build: ./build.sh --fe, ./build.sh --be
- Regression test: ./run-regression-test.sh --run --conf
/tmp/doris-regression-conf-run-path.groovy -d nereids_function_p0/agg_function
-s map_agg_by_key
- Static analysis: ./build-support/run-clang-tidy.sh --files
be/src/exprs/aggregate/aggregate_function_map_combinator.cpp
be/src/exprs/aggregate/aggregate_function_map_combinator.h
be/src/exprs/aggregate/aggregate_function_simple_factory.cpp
- Format: build-support/check-format.sh could not run because local
clang-format is not version 16
- Behavior changed: Yes (adds new aggregate functions)
- Does this need documentation: Yes (new SQL functions; documentation PR not
included)
--
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]