v.20.10New Feature

Add mapPopulateSeries function

Add mapPopulateSeries function. #13166 (Ildus Kurbangaliev).
Introduces the mapPopulateSeries function for working with map data types.

Why it matters

The mapPopulateSeries function is designed to help users generate a sequence of keys with corresponding values from existing map data, filling in missing keys in a specified range to ensure a complete series. This simplifies working with map structures where a continuous key series is necessary, such as time series or ordinal data, thus improving data completeness and query accuracy.

How to use it

Use the mapPopulateSeries function in your SQL queries by passing a map and the key range you want to populate. For example:

SELECT mapPopulateSeries(your_map, start_key, end_key)
FROM your_table

This will return a map with keys from start_key to end_key, filling in missing keys with default values as defined by the function.