v.19.9New Feature

Implement Dictget and Dictgetordefault Functions for Decimal Types

Implement dictGet and dictGetOrDefault functions for Decimal types. #5394 (Artem Zuikov)
Implemented dictGet and dictGetOrDefault functions for Decimal types in ClickHouse.

Why it matters

This feature enhances dictionary function support by enabling retrieval of Decimal type values using dictGet and dictGetOrDefault. It solves the limitation where these functions previously did not support Decimal types, thereby improving data handling and query flexibility for users working with Decimal data.

How to use it

Use dictGet or dictGetOrDefault as usual to query dictionaries containing Decimal columns. For example:

SELECT dictGet('dict_name', 'decimal_column', toUInt64(key))


or with a default value:

SELECT dictGetOrDefault('dict_name', 'decimal_column', toUInt64(key), 0.0)