You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/12/30 10:17:07 UTC

[GitHub] [iceberg] ZhangChaoming opened a new pull request #3823: Docs: Flink create table with primary key.(#3822)

ZhangChaoming opened a new pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823


   Improve docs that flink creates table with primary key.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ZhangChaoming commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
ZhangChaoming commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r788395830



##########
File path: site/docs/flink.md
##########
@@ -290,18 +290,33 @@ USE iceberg_db;
 
 ```sql
 CREATE TABLE `hive_catalog`.`default`.`sample` (
-    id BIGINT COMMENT 'unique id',
+    id BIGINT PRIMARY KEY NOT ENFORCED COMMENT 'unique id',
     data STRING
 );
 ```
 
 Table create commands support the most commonly used [flink create clauses](https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/sql/create.html#create-table) now, including: 
 
+* `PRIMARY KEY NOT ENFORCED` to declare table primary key(s).
 * `PARTITION BY (column1, column2, ...)` to configure partitioning, apache flink does not yet support hidden partitioning.
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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`
+
+To declare primary key(s) in a table, use `PRIMARY KEY NOT ENFORCED`:
+
+```sql
+CREATE TABLE `hive_catalog`.`default`.`sample` (
+    id BIGINT PRIMARY KEY NOT ENFORCED COMMENT 'unique id',
+    data STRING
+);
+```
+Or declare primary key(s) in a single column, like `PRIMARY KEY (id) NOT ENFORCED`.

Review comment:
       OK




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ZhangChaoming commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
ZhangChaoming commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r776985529



##########
File path: site/docs/flink.md
##########
@@ -301,7 +301,22 @@ Table create commands support the most commonly used [flink create clauses](http
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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`
+
+To declare primary key(s) in a table, use `PRIMARY KEY ... NOT ENFORCED`:
+
+```sql
+CREATE TABLE `hive_catalog`.`default`.`sample` (
+    id BIGINT COMMENT 'unique id',
+    data STRING,
+    PRIMARY KEY (id) NOT ENFORCED

Review comment:
       Yep, should I add another example ? 




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ZhangChaoming commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
ZhangChaoming commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r776985621



##########
File path: site/docs/flink.md
##########
@@ -301,7 +301,22 @@ Table create commands support the most commonly used [flink create clauses](http
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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`

Review comment:
       ok




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ZhangChaoming commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
ZhangChaoming commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r788395717



##########
File path: site/docs/flink.md
##########
@@ -290,18 +290,33 @@ USE iceberg_db;
 
 ```sql
 CREATE TABLE `hive_catalog`.`default`.`sample` (
-    id BIGINT COMMENT 'unique id',
+    id BIGINT PRIMARY KEY NOT ENFORCED COMMENT 'unique id',
     data STRING
 );
 ```
 
 Table create commands support the most commonly used [flink create clauses](https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/sql/create.html#create-table) now, including: 
 
+* `PRIMARY KEY NOT ENFORCED` to declare table primary key(s).
 * `PARTITION BY (column1, column2, ...)` to configure partitioning, apache flink does not yet support hidden partitioning.
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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`
+
+To declare primary key(s) in a table, use `PRIMARY KEY NOT ENFORCED`:

Review comment:
       OK.




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] hililiwei commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
hililiwei commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r776950251



##########
File path: site/docs/flink.md
##########
@@ -301,7 +301,22 @@ Table create commands support the most commonly used [flink create clauses](http
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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`
+
+To declare primary key(s) in a table, use `PRIMARY KEY ... NOT ENFORCED`:
+
+```sql
+CREATE TABLE `hive_catalog`.`default`.`sample` (
+    id BIGINT COMMENT 'unique id',
+    data STRING,
+    PRIMARY KEY (id) NOT ENFORCED
+);
+```
+
+Flink only support declare primary key(s) in not enforced mode. 
+More information see in [flink create clauses](https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/sql/create.html#create-table).

Review comment:
       > ......Table create commands support the most commonly used [flink create clauses](https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/sql/create.html#create-table) now.....
   
   Is it repeated here?

##########
File path: site/docs/flink.md
##########
@@ -301,7 +301,22 @@ Table create commands support the most commonly used [flink create clauses](http
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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`
+
+To declare primary key(s) in a table, use `PRIMARY KEY ... NOT ENFORCED`:
+
+```sql
+CREATE TABLE `hive_catalog`.`default`.`sample` (
+    id BIGINT COMMENT 'unique id',
+    data STRING,
+    PRIMARY KEY (id) NOT ENFORCED

Review comment:
       is `id BIGINT PRIMARY KEY NOT ENFORCED COMMENT 'unique id',`  support?

##########
File path: site/docs/flink.md
##########
@@ -301,7 +301,22 @@ Table create commands support the most commonly used [flink create clauses](http
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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`

Review comment:
        Could you add  description of `PRIMARY KEY`, below line 300?
   




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r786960973



##########
File path: site/docs/flink.md
##########
@@ -290,18 +290,33 @@ USE iceberg_db;
 
 ```sql
 CREATE TABLE `hive_catalog`.`default`.`sample` (
-    id BIGINT COMMENT 'unique id',
+    id BIGINT PRIMARY KEY NOT ENFORCED COMMENT 'unique id',
     data STRING
 );
 ```
 
 Table create commands support the most commonly used [flink create clauses](https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/sql/create.html#create-table) now, including: 
 
+* `PRIMARY KEY NOT ENFORCED` to declare table primary key(s).
 * `PARTITION BY (column1, column2, ...)` to configure partitioning, apache flink does not yet support hidden partitioning.
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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`
+
+To declare primary key(s) in a table, use `PRIMARY KEY NOT ENFORCED`:
+
+```sql
+CREATE TABLE `hive_catalog`.`default`.`sample` (
+    id BIGINT PRIMARY KEY NOT ENFORCED COMMENT 'unique id',
+    data STRING
+);
+```
+Or declare primary key(s) in a single column, like `PRIMARY KEY (id) NOT ENFORCED`.
+
+Note that flink only support declare primary key(s) in not enforced mode. 

Review comment:
       Note that Iceberg only supports primary keys that are not enforced.




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r786958684



##########
File path: site/docs/flink.md
##########
@@ -290,18 +290,33 @@ USE iceberg_db;
 
 ```sql
 CREATE TABLE `hive_catalog`.`default`.`sample` (
-    id BIGINT COMMENT 'unique id',
+    id BIGINT PRIMARY KEY NOT ENFORCED COMMENT 'unique id',
     data STRING
 );
 ```
 
 Table create commands support the most commonly used [flink create clauses](https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/sql/create.html#create-table) now, including: 
 
+* `PRIMARY KEY NOT ENFORCED` to declare table primary key(s).
 * `PARTITION BY (column1, column2, ...)` to configure partitioning, apache flink does not yet support hidden partitioning.
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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`
+
+To declare primary key(s) in a table, use `PRIMARY KEY NOT ENFORCED`:

Review comment:
       Please remove `(s)`. Either use the plural or singular form, whichever you think is more clear. Using parens like this is distracting from the point.




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ZhangChaoming commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
ZhangChaoming commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r788395965



##########
File path: site/docs/flink.md
##########
@@ -290,18 +290,33 @@ USE iceberg_db;
 
 ```sql
 CREATE TABLE `hive_catalog`.`default`.`sample` (
-    id BIGINT COMMENT 'unique id',
+    id BIGINT PRIMARY KEY NOT ENFORCED COMMENT 'unique id',
     data STRING
 );
 ```
 
 Table create commands support the most commonly used [flink create clauses](https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/sql/create.html#create-table) now, including: 
 
+* `PRIMARY KEY NOT ENFORCED` to declare table primary key(s).
 * `PARTITION BY (column1, column2, ...)` to configure partitioning, apache flink does not yet support hidden partitioning.
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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`
+
+To declare primary key(s) in a table, use `PRIMARY KEY NOT ENFORCED`:
+
+```sql
+CREATE TABLE `hive_catalog`.`default`.`sample` (
+    id BIGINT PRIMARY KEY NOT ENFORCED COMMENT 'unique id',
+    data STRING
+);
+```
+Or declare primary key(s) in a single column, like `PRIMARY KEY (id) NOT ENFORCED`.
+
+Note that flink only support declare primary key(s) in not enforced mode. 

Review comment:
       Done




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ZhangChaoming commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
ZhangChaoming commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r788395580



##########
File path: site/docs/flink.md
##########
@@ -290,18 +290,33 @@ USE iceberg_db;
 
 ```sql
 CREATE TABLE `hive_catalog`.`default`.`sample` (
-    id BIGINT COMMENT 'unique id',
+    id BIGINT PRIMARY KEY NOT ENFORCED COMMENT 'unique id',
     data STRING
 );
 ```
 
 Table create commands support the most commonly used [flink create clauses](https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/sql/create.html#create-table) now, including: 
 
+* `PRIMARY KEY NOT ENFORCED` to declare table primary key(s).
 * `PARTITION BY (column1, column2, ...)` to configure partitioning, apache flink does not yet support hidden partitioning.
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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.

Review comment:
       OK




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ZhangChaoming commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
ZhangChaoming commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r777788704



##########
File path: site/docs/flink.md
##########
@@ -301,7 +301,22 @@ Table create commands support the most commonly used [flink create clauses](http
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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`
+
+To declare primary key(s) in a table, use `PRIMARY KEY ... NOT ENFORCED`:
+
+```sql
+CREATE TABLE `hive_catalog`.`default`.`sample` (
+    id BIGINT COMMENT 'unique id',
+    data STRING,
+    PRIMARY KEY (id) NOT ENFORCED

Review comment:
       Fine




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ZhangChaoming closed pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
ZhangChaoming closed pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823


   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r786960521



##########
File path: site/docs/flink.md
##########
@@ -290,18 +290,33 @@ USE iceberg_db;
 
 ```sql
 CREATE TABLE `hive_catalog`.`default`.`sample` (
-    id BIGINT COMMENT 'unique id',
+    id BIGINT PRIMARY KEY NOT ENFORCED COMMENT 'unique id',
     data STRING
 );
 ```
 
 Table create commands support the most commonly used [flink create clauses](https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/sql/create.html#create-table) now, including: 
 
+* `PRIMARY KEY NOT ENFORCED` to declare table primary key(s).
 * `PARTITION BY (column1, column2, ...)` to configure partitioning, apache flink does not yet support hidden partitioning.
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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`
+
+To declare primary key(s) in a table, use `PRIMARY KEY NOT ENFORCED`:
+
+```sql
+CREATE TABLE `hive_catalog`.`default`.`sample` (
+    id BIGINT PRIMARY KEY NOT ENFORCED COMMENT 'unique id',
+    data STRING
+);
+```
+Or declare primary key(s) in a single column, like `PRIMARY KEY (id) NOT ENFORCED`.

Review comment:
       This should have a newline between the code block and the new paragraph.
   
   Instead of starting a sentence with "Or", you can use a phrase like "The primary key may also be declared as a `PRIMARY KEY` column" and then give a full example:
   
   ```sql
   CREATE TABLE `hive_catalog`.`default`.`sample` (
       id COMMENT 'unique id',
       data STRING,
       PRIMARY KEY (id) NOT ENFORCED
   );
   ```




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ZhangChaoming commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
ZhangChaoming commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r776985793



##########
File path: site/docs/flink.md
##########
@@ -301,7 +301,22 @@ Table create commands support the most commonly used [flink create clauses](http
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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`
+
+To declare primary key(s) in a table, use `PRIMARY KEY ... NOT ENFORCED`:
+
+```sql
+CREATE TABLE `hive_catalog`.`default`.`sample` (
+    id BIGINT COMMENT 'unique id',
+    data STRING,
+    PRIMARY KEY (id) NOT ENFORCED
+);
+```
+
+Flink only support declare primary key(s) in not enforced mode. 
+More information see in [flink create clauses](https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/sql/create.html#create-table).

Review comment:
       OK, I'll remove it.




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] kbendick commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
kbendick commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r777781323



##########
File path: site/docs/flink.md
##########
@@ -301,7 +301,22 @@ Table create commands support the most commonly used [flink create clauses](http
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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`
+
+To declare primary key(s) in a table, use `PRIMARY KEY ... NOT ENFORCED`:
+
+```sql
+CREATE TABLE `hive_catalog`.`default`.`sample` (
+    id BIGINT COMMENT 'unique id',
+    data STRING,
+    PRIMARY KEY (id) NOT ENFORCED

Review comment:
       I don't personally think it's worth another example. My understanding is that this is more of the differences in available FlinkSQL syntax, correct?
   
   If so, I don't think we need to demonstrate all possible forms for the same thing. It would be better left to their documentation to show various forms. Too many examples can make the document hard to read as well.




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ZhangChaoming commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
ZhangChaoming commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r777788704



##########
File path: site/docs/flink.md
##########
@@ -301,7 +301,22 @@ Table create commands support the most commonly used [flink create clauses](http
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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`
+
+To declare primary key(s) in a table, use `PRIMARY KEY ... NOT ENFORCED`:
+
+```sql
+CREATE TABLE `hive_catalog`.`default`.`sample` (
+    id BIGINT COMMENT 'unique id',
+    data STRING,
+    PRIMARY KEY (id) NOT ENFORCED

Review comment:
       Fine




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r786957653



##########
File path: site/docs/flink.md
##########
@@ -290,18 +290,33 @@ USE iceberg_db;
 
 ```sql
 CREATE TABLE `hive_catalog`.`default`.`sample` (
-    id BIGINT COMMENT 'unique id',
+    id BIGINT PRIMARY KEY NOT ENFORCED COMMENT 'unique id',
     data STRING
 );
 ```
 
 Table create commands support the most commonly used [flink create clauses](https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/sql/create.html#create-table) now, including: 
 
+* `PRIMARY KEY NOT ENFORCED` to declare table primary key(s).
 * `PARTITION BY (column1, column2, ...)` to configure partitioning, apache flink does not yet support hidden partitioning.
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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.

Review comment:
       We don't use words like "currently" or "yet" in documentation because those easily get out of date. Instead, just state what support is currently. These docs are going to be versioned soon, so it will remain correct in that version of the docs.




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r786956775



##########
File path: site/docs/flink.md
##########
@@ -290,18 +290,33 @@ USE iceberg_db;
 
 ```sql
 CREATE TABLE `hive_catalog`.`default`.`sample` (
-    id BIGINT COMMENT 'unique id',
+    id BIGINT PRIMARY KEY NOT ENFORCED COMMENT 'unique id',
     data STRING
 );
 ```
 
 Table create commands support the most commonly used [flink create clauses](https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/sql/create.html#create-table) now, including: 
 
+* `PRIMARY KEY NOT ENFORCED` to declare table primary key(s).
 * `PARTITION BY (column1, column2, ...)` to configure partitioning, apache flink does not yet support hidden partitioning.
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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.

Review comment:
       What is "it"?




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ZhangChaoming commented on a change in pull request #3823: Docs: Flink create table with primary key.(#3822)

Posted by GitBox <gi...@apache.org>.
ZhangChaoming commented on a change in pull request #3823:
URL: https://github.com/apache/iceberg/pull/3823#discussion_r788396452



##########
File path: site/docs/flink.md
##########
@@ -290,18 +290,33 @@ USE iceberg_db;
 
 ```sql
 CREATE TABLE `hive_catalog`.`default`.`sample` (
-    id BIGINT COMMENT 'unique id',
+    id BIGINT PRIMARY KEY NOT ENFORCED COMMENT 'unique id',
     data STRING
 );
 ```
 
 Table create commands support the most commonly used [flink create clauses](https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/sql/create.html#create-table) now, including: 
 
+* `PRIMARY KEY NOT ENFORCED` to declare table primary key(s).
 * `PARTITION BY (column1, column2, ...)` to configure partitioning, apache flink does not yet support hidden partitioning.
 * `COMMENT 'table document'` to set a table description.
 * `WITH ('key'='value', ...)` to set [table configuration](./configuration.md) which will be stored in apache 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.

Review comment:
       I will replace "it" with "Iceberg".




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org