From 5a4422506c89d22fb8cdab683e4404f5585b40de Mon Sep 17 00:00:00 2001 From: xuyu <11161569@vivo.com> Date: Thu, 24 Oct 2024 19:56:18 +0800 Subject: [PATCH 1/4] [doc] Add partitions doc added --- 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 a3dbde541f11..59bc472ca5b2 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. + +```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 b0d264651606..ce0706b52ac6 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. + +```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`. From 664593b71d6f12b5c7fd85f07e82bf5e95229baa Mon Sep 17 00:00:00 2001 From: xuyu <11161569@vivo.com> Date: Mon, 28 Oct 2024 19:14:34 +0800 Subject: [PATCH 2/4] fix --- docs/content/flink/sql-alter.md | 2 +- docs/content/spark/sql-alter.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/flink/sql-alter.md b/docs/content/flink/sql-alter.md index 59bc472ca5b2..5177f4b0b843 100644 --- a/docs/content/flink/sql-alter.md +++ b/docs/content/flink/sql-alter.md @@ -103,7 +103,7 @@ ALTER TABLE my_table DROP (c1, c2); The following SQL drops 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. +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 DROP PARTITION (`id` = 1); diff --git a/docs/content/spark/sql-alter.md b/docs/content/spark/sql-alter.md index ce0706b52ac6..b43eeb80974e 100644 --- a/docs/content/spark/sql-alter.md +++ b/docs/content/spark/sql-alter.md @@ -121,7 +121,7 @@ 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. +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'); From 5f1669fcbe6ab308cd36bc49e08798c3e5495ccb Mon Sep 17 00:00:00 2001 From: xuyu <11161569@vivo.com> Date: Mon, 28 Oct 2024 19:26:39 +0800 Subject: [PATCH 3/4] fix --- docs/content/flink/sql-alter.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/flink/sql-alter.md b/docs/content/flink/sql-alter.md index 5177f4b0b843..16d132831ff5 100644 --- a/docs/content/flink/sql-alter.md +++ b/docs/content/flink/sql-alter.md @@ -103,7 +103,7 @@ ALTER TABLE my_table DROP (c1, c2); The following SQL drops 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 +For flink sql, you can specify the partial columns of partition columns, and you can also specify multiple partition values at the same time. ```sql ALTER TABLE my_table DROP PARTITION (`id` = 1); @@ -118,7 +118,7 @@ ALTER TABLE my_table DROP PARTITION (`id` = 1), PARTITION (`id` = 2); 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. +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); From fe7b195e5e82d5e0922d24ef38b5f22ce9a7cfe1 Mon Sep 17 00:00:00 2001 From: xuyu <11161569@vivo.com> Date: Tue, 29 Oct 2024 09:36:19 +0800 Subject: [PATCH 4/4] fix --- docs/content/flink/sql-alter.md | 2 +- docs/content/spark/sql-alter.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/flink/sql-alter.md b/docs/content/flink/sql-alter.md index 16d132831ff5..bee616f047d4 100644 --- a/docs/content/flink/sql-alter.md +++ b/docs/content/flink/sql-alter.md @@ -118,7 +118,7 @@ ALTER TABLE my_table DROP PARTITION (`id` = 1), PARTITION (`id` = 2); 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 +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); diff --git a/docs/content/spark/sql-alter.md b/docs/content/spark/sql-alter.md index b43eeb80974e..11af186e6213 100644 --- a/docs/content/spark/sql-alter.md +++ b/docs/content/spark/sql-alter.md @@ -121,7 +121,7 @@ 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 +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');