dramaticlly commented on code in PR #19008:
URL: https://github.com/apache/iceberg/pull/19008#discussion_r4606639200


##########
core/src/main/java/org/apache/iceberg/MetadataTableUtils.java:
##########
@@ -55,6 +65,18 @@ public static Table createMetadataTableInstance(
 
   private static Table createMetadataTableInstance(
       Table baseTable, String metadataTableName, MetadataTableType type) {
+    if (!MANIFEST_INDEPENDENT_TABLES.contains(type)) {
+      TableMetadata metadata = ((BaseTable) baseTable).operations().current();
+      if (metadata.formatVersion() >= MIN_FORMAT_VERSION_WITH_ROOT_MANIFESTS
+          && metadata.snapshots().stream()
+              .anyMatch(snapshot -> snapshot.rootManifestLocation() != null)) {

Review Comment:
   non blocking: if this validation logic appeared too many times, might 
consider move to TableUtil, we already have a generic way to return format 
version given table.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to