gravitino icon indicating copy to clipboard operation
gravitino copied to clipboard

[FEATURE] supports RENAME TABLE to move a table from one database to another

Open mchades opened this issue 4 months ago • 3 comments

Describe the feature

supports RENAME TABLE to move a table from one database to another

Motivation

Currently, we only support renaming a table within the same database. However, some systems, such as MySQL (https://dev.mysql.com/doc/refman/8.4/en/rename-table.html), support renaming a table to move it between databases.

Describe the solution

Add a new change type like "moveToSchema" to the table change support.

Additional context

No response

mchades avatar Sep 01 '25 09:09 mchades

@jerqi Can you help check how we should handle privilege if we want to support this operation? thx

mchades avatar Sep 11 '25 02:09 mchades

For MySQL, You must have ALTER and DROP privileges for the original table, and CREATE and INSERT privileges for the new table.

jerqi avatar Sep 11 '25 02:09 jerqi

For us, it must be the owner of the table and have the another schema create privilege.

jerqi avatar Sep 11 '25 02:09 jerqi