v.22.2Improvement

flat, hashed, and hashed_array dictionaries support empty attributes and dictHas functionality

flat, hashed, hashed_array dictionaries now support creating with empty attributes, with support of reading the keys and using dictHas. Fixes #33820. #33918 (Maksim Kita).
flat, hashed, and hashed_array dictionaries now support creation with empty attributes, allowing users to read keys and use the dictHas function without defining any attributes.

Why it matters

Previously, dictionaries required at least one attribute defined for creation and usage. This feature solves the limitation by enabling the creation of dictionaries with zero attributes, which is useful for scenarios where only key existence checks via dictHas are needed. It improves flexibility and usability of dictionaries in ClickHouse.

How to use it

Create dictionaries of types flat, hashed, or hashed_array without specifying any attributes. You can then use dictHas to check for the presence of keys in these attribute-less dictionaries.