v.21.12Improvements

Support IF EXISTS Modifier for RENAME DATABASE/TABLE/DICTIONARY Query

Support IF EXISTS modifier for RENAME DATABASE/TABLE/DICTIONARY query. If this directive is used, one will not get an error if the DATABASE/TABLE/DICTIONARY to be renamed doesn't exist. #31081 (victorgao).
Support for the IF EXISTS modifier in RENAME DATABASE, RENAME TABLE, and RENAME DICTIONARY queries is added.

Why it matters

This feature prevents errors from occurring when attempting to rename a database, table, or dictionary that does not exist, improving query robustness and user experience by allowing safer rename operations.

How to use it

Add the IF EXISTS clause to your RENAME statement. For example:

RENAME TABLE IF EXISTS old_table_name TO new_table_name;