v.20.7New Feature

Add mapAdd and mapSubtract functions for key-mapped values

Add mapAdd and mapSubtract functions for adding/subtracting key-mapped values. #11735 (Ildus Kurbangaliev).
Added mapAdd and mapSubtract functions to perform addition and subtraction operations on values mapped by keys within map data structures.

Why it matters

These functions enable users to efficiently combine or differentiate maps by their keys, simplifying operations that involve aggregating or comparing key-value pairs without manual handling of each entry.

How to use it

Use the mapAdd function to add values from two maps aligned by their keys, and mapSubtract to subtract values of one map from another by keys. These functions can be applied directly in queries to manipulate map data types in expressions.