rdblue commented on code in PR #9384:
URL: https://github.com/apache/iceberg/pull/9384#discussion_r1439061554


##########
core/src/main/java/org/apache/iceberg/deletes/SortingPositionOnlyDeleteWriter.java:
##########
@@ -93,9 +135,9 @@ private DeleteWriteResult writeDeletes() throws IOException {
     return writer.result();
   }
 
-  private List<CharSequence> sortedPaths() {
-    List<CharSequence> paths = Lists.newArrayList(positionsByPath.keySet());
-    paths.sort(Comparators.charSequences());
-    return paths;
+  private Iterable<CharSequence> sort(Iterable<CharSequence> paths) {

Review Comment:
   What about using `Collection` for the incoming so you can test its size? 
Then you could check whether the size is 1 and avoid copying the list.



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