You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "linfey90 (via GitHub)" <gi...@apache.org> on 2023/03/29 07:48:54 UTC

[GitHub] [iceberg] linfey90 opened a new pull request, #7236: support table comment

linfey90 opened a new pull request, #7236:
URL: https://github.com/apache/iceberg/pull/7236

   This pr supports comment of the flink iceberg table, including create table and alter table. Regarding field comments, the flink code currently needs to be modified.


-- 
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 diff in pull request #7236: Flink: support table comment

Posted by "hililiwei (via GitHub)" <gi...@apache.org>.
hililiwei commented on code in PR #7236:
URL: https://github.com/apache/iceberg/pull/7236#discussion_r1152963983


##########
flink/v1.16/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java:
##########
@@ -613,8 +617,9 @@ static CatalogTable toCatalogTable(Table table) {
     // may use
     // CatalogTableImpl to copy a new catalog table.
     // Let's re-loading table from Iceberg catalog when creating source/sink operators.
-    // Iceberg does not have Table comment, so pass a null (Default comment value in Flink).
-    return new CatalogTableImpl(schema, partitionKeys, table.properties(), null);
+    Map<String, String> prop = Maps.newHashMap(table.properties());
+    String comment = prop.remove(COMMENT);

Review Comment:
   Iceberg does not have Table comment, and we never seem to get a value here. We don't seem to need to change this.
   
   



-- 
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 diff in pull request #7236: Flink: support table comment

Posted by "hililiwei (via GitHub)" <gi...@apache.org>.
hililiwei commented on code in PR #7236:
URL: https://github.com/apache/iceberg/pull/7236#discussion_r1152954980


##########
flink/v1.14/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java:
##########
@@ -418,7 +419,10 @@ void createIcebergTable(ObjectPath tablePath, CatalogBaseTable table, boolean ig
         properties.put(entry.getKey(), entry.getValue());
       }
     }
-
+    // add table comment
+    if (!StringUtils.isNullOrWhitespaceOnly(table.getComment())) {
+      properties.put(COMMENT, table.getComment());
+    }

Review Comment:
   nit: empty line.



-- 
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