pvary commented on code in PR #12199:
URL: https://github.com/apache/iceberg/pull/12199#discussion_r1947500200


##########
flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java:
##########
@@ -332,7 +335,15 @@ public List<String> listTables(String databaseName)
   public CatalogTable getTable(ObjectPath tablePath)
       throws TableNotExistException, CatalogException {
     Table table = loadIcebergTable(tablePath);
-    return toCatalogTable(table);
+    Map<String, String> catalogAndTableProps = Maps.newHashMap(catalogProps);
+    catalogAndTableProps.put(FlinkCreateTableOptions.CATALOG_NAME.key(), 
getName());
+    catalogAndTableProps.put(
+        FlinkCreateTableOptions.CATALOG_DATABASE.key(), 
tablePath.getDatabaseName());
+    catalogAndTableProps.put(
+        FlinkCreateTableOptions.CATALOG_TABLE.key(), 
tablePath.getObjectName());
+    catalogAndTableProps.put("connector", 
FlinkDynamicTableFactory.FACTORY_IDENTIFIER);
+    catalogAndTableProps.putAll(table.properties());
+    return toCatalogTableWithProps(table, catalogAndTableProps);

Review Comment:
   Could you help me understand why is the table properties needed to be added 
here?
   We also send the table as a parameter. Wouldn't it be enough?



-- 
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-unsubscr...@iceberg.apache.org

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


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

Reply via email to