Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] Add doc for adding partitions #4374

Merged
merged 4 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading