v.19.9New Feature
Implement Dictget and Dictgetordefault Functions for Decimal Types
ImplementdictGetanddictGetOrDefaultfunctions for Decimal types. #5394 (Artem Zuikov)
Why it matters
This feature enhances dictionary function support by enabling retrieval of Decimal type values usingdictGet 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
UsedictGet 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)