yuzelin commented on code in PR #457:
URL: https://github.com/apache/flink-table-store/pull/457#discussion_r1062053382


##########
docs/content/docs/how-to/writing-tables.md:
##########
@@ -87,3 +87,66 @@ INSERT OVERWRITE MyTable PARTITION (key1 = value1, key2 = 
value2, ...) SELECT ..
 {{< /tab >}}
 
 {{< /tabs >}}
+
+## Purging tables
+
+You can use `INSERT OVERWRITE` to purge tables by inserting empty value.
+
+{{< tabs "purge-tables-syntax" >}}
+
+{{< tab "Flink" >}}
+
+```sql
+INSERT OVERWRITE MyTable SELECT * FROM MyTable WHERE false
+```
+
+{{< /tab >}}
+
+{{< /tabs >}}
+
+## Purging a Partition
+
+Particularly, you can use `INSERT OVERWRITE` to purge data of a partition by 
inserting empty value to the partition:
+
+{{< tabs "purge-partition-syntax" >}}
+
+{{< tab "Flink" >}}
+
+```sql
+INSERT OVERWRITE MyTable PARTITION (key1 = value1, key2 = value2, ...) SELECT 
selectSpec FROM MyTable WHERE false
+```
+
+{{< /tab >}}
+
+{{< /tabs >}}
+
+{{< hint warning >}}
+
+The `selectSpec` should includes all the columns in the table except the 
partition columns behind PARTITION.

Review Comment:
   This hint is not compatible with `Overwriting a Partition` section because 
here it selects data from the same table but in `Overwriting a Partition` 
section it can select data from any table.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to