v.22.2Improvement
flat, hashed, and hashed_array dictionaries support empty attributes and dictHas functionality
flat,hashed,hashed_arraydictionaries now support creating with empty attributes, with support of reading the keys and usingdictHas. Fixes #33820. #33918 (Maksim Kita).
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 viadictHas are needed. It improves flexibility and usability of dictionaries in ClickHouse.How to use it
Create dictionaries of typesflat, 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.