v.18.12New Feature

Added arrayEnumerateDense Function

Added the arrayEnumerateDense function. Amos Bird
Added the arrayEnumerateDense function to ClickHouse.

Why it matters

The arrayEnumerateDense function provides a way to enumerate elements in an array with dense consecutive numbering, which helps in scenarios where users need to assign sequential indices to array elements without gaps. This enhances array processing capabilities by allowing efficient enumeration within array contexts.

How to use it

Use the arrayEnumerateDense function by passing an array as an argument. It returns an array of indices corresponding to the elements, numbered consecutively starting from 1 with no gaps.

Example:
SELECT arrayEnumerateDense(['a', 'b', 'c'])

This will return an array like [1, 2, 3].