v.23.2Improvement

Function Length Argument Restriction in ClickHouse Functions

Currently for functions like leftPad, rightPad, leftPadUTF8, rightPadUTF8, the second argument length must be UInt8|16|32|64|128|256. Which is too strict for clickhouse users, besides, it is not consistent with other similar functions like arrayResize, substring and so on. #46103 (李扬).
Relaxed the type requirement for the length argument in leftPad, rightPad, leftPadUTF8, and rightPadUTF8 functions to accept more integer types, aligning with other similar functions like arrayResize and substring.

Why it matters

Previously, the length argument in these padding functions was restricted to UInt8, UInt16, UInt32, UInt64, UInt128, or UInt256, which was too strict and inconsistent compared to other functions. This change makes it easier for users to work with these functions without manual type conversion and improves consistency in the API.

How to use it

Users can now pass any integer type accepted by ClickHouse (beyond the previous restricted set) as the length argument in leftPad, rightPad, leftPadUTF8, and rightPadUTF8 without needing explicit type casting.