v.18.14Improvement
Support for intDiv and intDivOrZero Functions for Decimal
Support for theintDivandintDivOrZerofunctions forDecimal. b48402e8
Why it matters
This feature enables integer division operations directly onDecimal types, expanding the functionality of intDiv and intDivOrZero. It solves the limitation where these functions previously did not support decimals, allowing users to perform safe and precise integer division with decimal numbers.How to use it
Users can now use the functionsintDiv and intDivOrZero with Decimal columns or expressions just like with integer types. For example:SELECT intDiv(decimal_column, 10) FROM table;
SELECT intDivOrZero(decimal_column, 0) FROM table;