Skip to content

Commit

Permalink
[doc] Add doc for adding partitions (#4374)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzifu666 authored Oct 29, 2024
1 parent a0727bd commit 1eba087
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/content/flink/sql-alter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
8 changes: 8 additions & 0 deletions docs/content/spark/sql-alter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit 1eba087

Please sign in to comment.