sum_map
Description
Aggregates MAP values by summing numeric values for matching keys across multiple rows. This function is inspired by ClickHouse's sumMap and is particularly useful for data aggregation scenarios involving maps with numeric values.
Given multiple maps with the same key type and numeric value type, sum_map merges them by:
- Collecting all unique keys from all input maps
- Summing the values for each key across all maps
- Returning a single map with the aggregated results
Syntax
sum_map(map_expr)