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/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 1eba08764 [doc] Add doc for adding partitions (#4374)
1eba08764 is described below
commit 1eba087646c27dd8b16d0e26096ad4af3231e87f
Author: xuzifu666 <[email protected]>
AuthorDate: Tue Oct 29 12:39:32 2024 +0800
[doc] Add doc for adding partitions (#4374)
---
docs/content/flink/sql-alter.md | 15 +++++++++++++++
docs/content/spark/sql-alter.md | 8 ++++++++
2 files changed, 23 insertions(+)
diff --git a/docs/content/flink/sql-alter.md b/docs/content/flink/sql-alter.md
index a3dbde541..bee616f04 100644
--- a/docs/content/flink/sql-alter.md
+++ b/docs/content/flink/sql-alter.md
@@ -114,6 +114,21 @@ ALTER TABLE my_table DROP PARTITION (`id` = 1), PARTITION
(`id` = 2);
```
+## Adding Partitions
+
+The following SQL adds the partitions of the paimon table.
+
+For flink sql, you can specify the partial columns of partition columns, and
you can also specify multiple partition values at the same time, only with
metastore configured metastore.partitioned-table=true.
+
+```sql
+ALTER TABLE my_table ADD PARTITION (`id` = 1);
+
+ALTER TABLE my_table ADD PARTITION (`id` = 1, `name` = 'paimon');
+
+ALTER TABLE my_table ADD PARTITION (`id` = 1), PARTITION (`id` = 2);
+
+```
+
## Changing Column Nullability
The following SQL changes nullability of column `coupon_info`.
diff --git a/docs/content/spark/sql-alter.md b/docs/content/spark/sql-alter.md
index b0d264651..11af186e6 100644
--- a/docs/content/spark/sql-alter.md
+++ b/docs/content/spark/sql-alter.md
@@ -119,6 +119,14 @@ The following SQL drops the partitions of the paimon
table. For spark sql, you n
ALTER TABLE my_table DROP PARTITION (`id` = 1, `name` = 'paimon');
```
+## Adding Partitions
+
+The following SQL adds the partitions of the paimon table. For spark sql, you
need to specify all the partition columns, only with metastore configured
metastore.partitioned-table=true.
+
+```sql
+ALTER TABLE my_table ADD PARTITION (`id` = 1, `name` = 'paimon');
+```
+
## Changing Column Comment
The following SQL changes comment of column `buy_count` to `buy count`.