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


##########
nessie/src/main/java/org/apache/iceberg/nessie/NessieUtil.java:
##########
@@ -190,4 +203,118 @@ public static Optional<Conflict> extractSingleConflict(
     Conflict conflict = conflicts.get(0);
     return Optional.of(conflict);
   }
+
+  public static ViewMetadata loadViewMetadata(
+      ViewMetadata metadata, String metadataLocation, Reference reference) {
+    Map<String, String> newProperties = Maps.newHashMap(metadata.properties());
+    newProperties.put(NessieTableOperations.NESSIE_COMMIT_ID_PROPERTY, 
reference.getHash());
+
+    return ViewMetadata.buildFrom(
+            
ViewMetadata.buildFrom(metadata).setProperties(newProperties).build())
+        .setMetadataLocation(metadataLocation)
+        .build();
+  }
+
+  static void handleExceptionsForCommits(Exception exception, String refName, 
Content.Type type) {

Review Comment:
   in that case wouldn't it make more sense to return an exception from this 
method, so that the calling side can actually do a `throw 
handleExceptionsForCommits(..)`?



-- 
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