alessandro-nori commented on code in PR #14886:
URL: https://github.com/apache/iceberg/pull/14886#discussion_r2665889119
##########
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:
Currently, an exception is already thrown if we forget to set
`orphanFilesCount` with the builder:
```
java.lang.IllegalStateException: Cannot build Result, some of required
attributes are not set [orphanFilesCount]
at
org.apache.iceberg.actions.ImmutableDeleteOrphanFiles$Result$Builder.build(ImmutableDeleteOrphanFiles.java:255)
at
org.apache.iceberg.spark.actions.DeleteOrphanFilesSparkAction.deleteFiles(DeleteOrphanFilesSparkAction.java:303)
```
--
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]