swapna267 commented on code in PR #12199: URL: https://github.com/apache/iceberg/pull/12199#discussion_r1960980812
########## 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: Yeah merged it here , as merging later on needs an extra map. Renamed the method to toCatalogTableWithCustomProps and modified parameter names. Hope it's more readable now. -- 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