rdblue commented on a change in pull request #1978:
URL: https://github.com/apache/iceberg/pull/1978#discussion_r549444803
##########
File path: flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java
##########
@@ -447,10 +459,12 @@ private static void validateFlinkTable(CatalogBaseTable
table) {
if (!schema.getWatermarkSpecs().isEmpty()) {
throw new UnsupportedOperationException("Creating table with watermark
specs is not supported yet.");
}
+ }
- if (schema.getPrimaryKey().isPresent()) {
- throw new UnsupportedOperationException("Creating table with primary key
is not supported yet.");
- }
+ private static List<String> toEqualityColumns(TableSchema schema) {
+ List<String> equalityColumns = Lists.newArrayList();
+ schema.getPrimaryKey().ifPresent(uniqueConstraint ->
equalityColumns.addAll(uniqueConstraint.getColumns()));
Review comment:
It seems like we should track primary key columns in the table format
rather than in properties. If we are going to add primary key columns, then we
should add it before v2 so that v2 writers are required to not drop 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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]