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
commit c24e0086916e7ad0b5041e986de11cd7fa93eb5b Author: JingsongLi <[email protected]> AuthorDate: Tue Jun 13 22:10:19 2023 +0800 [doc] Document Pick Partition Fields --- docs/content/how-to/creating-tables.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/content/how-to/creating-tables.md b/docs/content/how-to/creating-tables.md index a734312b5..0f4916c6c 100644 --- a/docs/content/how-to/creating-tables.md +++ b/docs/content/how-to/creating-tables.md @@ -218,13 +218,23 @@ CREATE TABLE MyTable ( {{< /tabs >}} {{< hint info >}} -Partition keys must be a subset of primary keys if primary keys are defined. +By configuring [partition.expiration-time]({{< ref "maintenance/manage-partition" >}}), expired partitions can be automatically deleted. {{< /hint >}} +### Pick Partition Fields + {{< hint info >}} -By configuring [partition.expiration-time]({{< ref "maintenance/manage-partition" >}}), expired partitions can be automatically deleted. +Partition fields must be a subset of primary keys if primary keys are defined. {{< /hint >}} +The following three types of fields may be defined as partition fields in the warehouse: +- Creation Time (Recommended): The creation time is generally immutable, so you can confidently treat it as a partition field + and add it to the primary key. +- Event Time: Event time is a field in the original table. For CDC data, such as tables synchronized from MySQL + CDC or Changelogs generated by Paimon, they are all complete CDC data, including `UPDATE_BEFORE` records, even + if you declare the primary key containing partition field, you can achieve the unique effect. +- CDC op_ts: It cannot be defined as a partition field, unable to know previous record timestamp. + ## Create Table As Table can be created and populated by the results of a query, for example, we have a sql like this: `CREATE TABLE table_b AS SELECT id, name FORM table_a`,
