stevenzwu commented on code in PR #6222: URL: https://github.com/apache/iceberg/pull/6222#discussion_r1036696028
########## flink/v1.16/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java: ########## @@ -148,6 +150,17 @@ private Namespace toNamespace(String database) { } TableIdentifier toIdentifier(ObjectPath path) { + String objectName = path.getObjectName(); + List<String> tableName = Splitter.on('$').splitToList(objectName); + if (tableName.size() > 1 && MetadataTableType.from(tableName.get(1)) != null) { + return TableIdentifier.parse( + toNamespace(path.getDatabaseName()).toString() Review Comment: I would make `toNamespace` a static method taking two params (instead of one currently) ``` /** Append a new level to the base namespace */ private static Namespace appendLevel(Namespace baseNamespace, String newLevel) ``` Then we can append a new level `tableName.get(0)` to the baseNamespace. treat `tableName.get(1)` as name when constructing the TableIdentifier. ``` public static TableIdentifier of(Namespace namespace, String name) ``` -- 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