v.20.8New Feature
Add default value function for type retrieval
Add function defaultValueOfTypeName that returns the default value for a given type. #13877 (hcz).Why it matters
This function provides an easy way to obtain the default value corresponding to any given ClickHouse data type, which helps in dynamic query construction, default value assignments, and improves type handling flexibility.How to use it
Call the function with the type name as a string argument to retrieve the default value. For example:SELECT defaultValueOfTypeName('Int32')This query returns the default value for the
Int32 type.