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/24 05:50:38 UTC

[incubator-paimon] branch master updated: [doc] Document partition expire for logical deleting

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 74b3078aa [doc] Document partition expire for logical deleting
74b3078aa is described below

commit 74b3078aa062ec526f04ee5f51458ecbe7b8946b
Author: Jingsong <ji...@gmail.com>
AuthorDate: Mon Jul 24 13:50:30 2023 +0800

    [doc] Document partition expire for logical deleting
---
 docs/content/maintenance/manage-partition.md | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/docs/content/maintenance/manage-partition.md b/docs/content/maintenance/manage-partition.md
index 126cc7dbd..ff1658786 100644
--- a/docs/content/maintenance/manage-partition.md
+++ b/docs/content/maintenance/manage-partition.md
@@ -32,7 +32,13 @@ the status of partitions and delete expired partitions according to time.
 How to determine whether a partition has expired: compare the time extracted from the partition with the current
 time to see if survival time has exceeded the `partition.expiration-time`.
 
-An example:
+{{< hint info >}}
+__Note:__ After the partition expires, it is logically deleted and the latest snapshot cannot query its data. But the
+files in the file system are not immediately physically deleted, it depends on when the corresponding snapshot expires.
+See [Expire Snapshots]({{< ref "/maintenance/manage-snapshots#expire-snapshots" >}}).
+{{< /hint >}}
+
+An example for single partition field:
 ```sql
 CREATE TABLE T (...) PARTITIONED BY (dt) WITH (
     'partition.expiration-time' = '7 d',
@@ -41,6 +47,16 @@ CREATE TABLE T (...) PARTITIONED BY (dt) WITH (
 );
 ```
 
+An example for multiple partition fields:
+```sql
+CREATE TABLE T (...) PARTITIONED BY (other_key, dt) WITH (
+    'partition.expiration-time' = '7 d',
+    'partition.expiration-check-interval' = '1 d',
+    'partition.timestamp-formatter' = 'yyyyMMdd',
+    'partition.timestamp-pattern' = '$dt'
+);
+```
+
 More options:
 
 <table class="table table-bordered">