v.24.8New Feature
Add printf function for Spark compatibility
Add functionprintffor Spark compatibility (but you can use the existingformatfunction). #66257 (李扬).
Why it matters
The addition of theprintf function addresses the need for compatibility with Spark SQL syntax, allowing users migrating or integrating with Spark to use familiar string formatting functions in ClickHouse without rewriting queries.How to use it
Use theprintf function in your SQL queries similarly to Spark's syntax, for example: SELECT printf('%s-%d', 'example', 1) This function works alongside the existing format function and does not require special enabling.