v.18.12New Feature
Added DECIMAL Data Type Support in ClickHouse
Added theDECIMAL(digits, scale)data type (Decimal32(scale),Decimal64(scale),Decimal128(scale)). To enable it, use the settingallow_experimental_decimal_type. #2846 #2970 #3008 #3047
Why it matters
The newDECIMAL data type provides fixed-point numeric precision, enabling accurate representation and calculation of decimal numbers with user-defined precision and scale. This feature solves issues related to floating-point inaccuracies and improves support for financial and scientific data involving precise decimal values.How to use it
To enable theDECIMAL data type, set the setting allow_experimental_decimal_type to 1. Then define columns using syntax like DECIMAL(precision, scale) or the specific types Decimal32(scale), Decimal64(scale), and Decimal128(scale) in table schemas.