amogh-jahagirdar commented on code in PR #14886:
URL: https://github.com/apache/iceberg/pull/14886#discussion_r2665682488


##########
api/src/main/java/org/apache/iceberg/actions/DeleteOrphanFiles.java:
##########
@@ -142,6 +142,11 @@ default DeleteOrphanFiles equalAuthorities(Map<String, 
String> newEqualAuthoriti
   interface Result {
     /** Returns locations of orphan files. */
     Iterable<String> orphanFileLocations();
+
+    /** Returns the total number of orphan files. */
+    default long orphanFilesCount() {
+      return 0;

Review Comment:
   Ah just commented. I don't think having the -1 is a good idea. 
   
   If I understand right this is specifically how many orphan files were 
deleted. That should always be >= 0, at least for me that's the [least 
surprising 
result](https://en.wikipedia.org/wiki/Principle_of_least_astonishment) . 
   
   Let's say we fail to compute orphans to begin with, there should be an 
exception that's thrown (so there's no result to begin with). Let's say we 
compute the orphans, and then fail to delete 1 or more (then filesCount >= 0). 
etc 



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to