arjun4084346 commented on code in PR #3870:
URL: https://github.com/apache/gobblin/pull/3870#discussion_r1470390976


##########
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergDataset.java:
##########
@@ -188,11 +215,19 @@ protected Map<Path, FileStatus> 
getFilePathsToFileStatus(FileSystem targetFs, Co
           this.getFileSetId(), currentSnapshotOverview.getSnapshotId(),
           currentSnapshotOverview.getManifestListPath(),
           currentSnapshotOverview.getMetadataPath().orElse("<<ERROR: 
MISSING!>>"));
-      return Maps.newHashMap();
+      TableMetadata readTimeTableMetadata = 
currentSnapshotOverview.getTableMetadata().orElseThrow(() -> new 
RuntimeException(
+          String.format("~%s~ no table metadata for current snapshot '%s' at 
'%s' with metadata path '%s'",
+              this.getFileSetId(), currentSnapshotOverview.getSnapshotId(),
+              currentSnapshotOverview.getManifestListPath(),
+              currentSnapshotOverview.getMetadataPath().orElse("<<ERROR: 
MISSING!>>"))));
+      return new GetFilePathsToFileStatusResult(Maps.newHashMap(), 
readTimeTableMetadata);
     }
+
+    List<TableMetadata> readTimeTableMetadataHolder = Lists.newArrayList(); // 
expecting exactly one elem

Review Comment:
   Why not just `TableMetadata readTimeTableMetadataHolder = null` if there 
will be only one element?



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

Reply via email to