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


##########
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:
   it is more about how this is handling in the exception block where this 
method is called. Having an explicit `throw` where this method is called is 
more readable IMO



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