You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@paimon.apache.org by lz...@apache.org on 2023/07/31 06:06:19 UTC

[incubator-paimon] branch master updated: [docs] spark rename paimon table need notice can't put catalog name before the renamed-to table (#1639)

This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new d2b7ec61d [docs] spark rename paimon table need notice can't put catalog name before the renamed-to table (#1639)
d2b7ec61d is described below

commit d2b7ec61d94e7c1f3da4c75ab49543b216ee58c3
Author: YeJunHao <41...@users.noreply.github.com>
AuthorDate: Mon Jul 31 14:06:15 2023 +0800

    [docs] spark rename paimon table need notice can't put catalog name before the renamed-to table (#1639)
---
 docs/content/how-to/altering-tables.md | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/docs/content/how-to/altering-tables.md b/docs/content/how-to/altering-tables.md
index 4b46a6619..d7c9f62e3 100644
--- a/docs/content/how-to/altering-tables.md
+++ b/docs/content/how-to/altering-tables.md
@@ -80,10 +80,20 @@ ALTER TABLE my_table RENAME TO my_table_new;
 
 {{< tab "Spark3" >}}
 
+The simplest sql to call is:
 ```sql
 ALTER TABLE my_table RENAME TO my_table_new;
 ```
 
+Note that: we can rename paimon table in spark this way:
+```sql
+ALTER TABLE [catalog.[database.]]test1 RENAME to [database.]test2;
+```
+But we can't put catalog name before the renamed-to table, it will throw an error if we write sql like this:
+```sql
+ALTER TABLE catalog.database.test1 RENAME to catalog.database.test2;
+```
+
 {{< /tab >}}
 
 {{< tab "Trino" >}}