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


##########
core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java:
##########
@@ -138,20 +138,16 @@ protected boolean isCaseSensitive() {
   }
 
   protected PartitionSpec dataSpec() {
-    Set<PartitionSpec> specs = dataSpecs();
+    Set<PartitionSpec> specs =
+        
newDataFilesBySpec.keySet().stream().map(this::spec).collect(ImmutableSet.toImmutableSet());

Review Comment:
   neat, I actually didn't know about `Iterables.getOnlyElement()` and just 
realized that we're already using it at a bunch of places across the codebase. 
I've updated this, thanks for the suggestion



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