nastra commented on code in PR #10253:
URL: https://github.com/apache/iceberg/pull/10253#discussion_r1877460844


##########
core/src/main/java/org/apache/iceberg/view/ViewUtil.java:
##########
@@ -18,12 +18,34 @@
  */
 package org.apache.iceberg.view;
 
+import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.iceberg.Schema;
 import org.apache.iceberg.catalog.TableIdentifier;
+import org.apache.iceberg.types.TypeUtil;
 
 public class ViewUtil {
   private ViewUtil() {}
 
   public static String fullViewName(String catalog, TableIdentifier ident) {
     return catalog + "." + ident;
   }
+
+  public static Schema assignFreshIds(ViewMetadata base, Schema newSchema) {
+    return TypeUtil.assignFreshIds(
+        newSchema,
+        base.schema(),
+        new AtomicInteger(highestFieldId(base.schemas()))::incrementAndGet);
+  }
+
+  public static int maxVersionId(ViewMetadata metadata) {

Review Comment:
   I've removed this refactoring around `maxVersionId` for now since assigning 
fresh ids moved into `ViewMetadata` and it didn't seem appropriate anymore to 
include this refactoring (I'll open a separate PR for 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-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