nastra commented on code in PR #7382:
URL: https://github.com/apache/iceberg/pull/7382#discussion_r1266564764
##########
docs/flink-ddl.md:
##########
@@ -160,20 +161,36 @@ Table create commands support the commonly used [Flink
create clauses](https://n
* `COMMENT 'table document'` to set a table description.
* `WITH ('key'='value', ...)` to set [table configuration](../configuration)
which will be stored in Iceberg table properties.
-Currently, it does not support computed column, primary key and watermark
definition etc.
+Currently, it does not support computed column and watermark definition etc.
+
+#### `PRIMARY KEY`
+
+Primary key constraint can be declared for a column or a set of columns, which
must be unique and do not contain null.
+It's required for [`UPSERT` mode](../flink/flink-writes.md#upsert).
+
+```sql
+CREATE TABLE `hive_catalog`.`default`.`sample` (
+ id BIGINT COMMENT 'unique id',
+ data STRING NOT NULL,
+ PRIMARY KEY(`id`) NOT ENFORCED
+)
+WITH ('format-version'='2');
+```
-### `PARTITIONED BY`
+#### `PARTITIONED BY`
To create a partition table, use `PARTITIONED BY`:
```sql
CREATE TABLE `hive_catalog`.`default`.`sample` (
id BIGINT COMMENT 'unique id',
- data STRING
-) PARTITIONED BY (data);
+ data STRING NOT NULL
+)
+PARTITIONED BY (data)
Review Comment:
I think the `PARTITIONED BY (data) WITH ('format-version'='2');` should be
appended to the previous line. Same for the other places that were updated
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]