v.21.3Improvement

Implicit Conversion from Integer to Decimal Type Throws ARGUMENT_OUT_OF_BOUND Error

Implicit conversion from integer to Decimal type might succeeded if integer value doe not fit into Decimal type. Now it throws ARGUMENT_OUT_OF_BOUND. #20232 (tavplubix).
ClickHouse now throws an ARGUMENT_OUT_OF_BOUND exception when an implicit conversion from an integer to a Decimal type fails due to the integer value not fitting into the Decimal type.

Why it matters

This feature improves data type safety by preventing silent truncation or incorrect results caused by integer values that exceed the capacity of the target Decimal type during implicit conversion.

How to use it

Users do not need to enable anything explicitly. The behavior is applied automatically when an implicit conversion from integer to Decimal is attempted and the integer value does not fit within the Decimal type's bounds.