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


##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/actions/BaseDeleteOrphanFilesSparkAction.java:
##########
@@ -143,6 +148,24 @@ public BaseDeleteOrphanFilesSparkAction 
executeDeleteWith(ExecutorService execut
     return this;
   }
 
+  @Override
+  public DeleteOrphanFiles prefixMismatchMode(PrefixMisMatchMode mismatchMode) 
{
+    this.prefixMismatchMode = mismatchMode;
+    return this;
+  }
+
+  @Override
+  public DeleteOrphanFiles equivalentSchemes(List<String> schemes) {
+    this.equivalentSchemes = schemes;

Review Comment:
   These methods need to make a defensive copy of the list. First, that's to 
ensure that any modification to the list will not change the action's behavior. 
Second, this is passed directly into an object that gets serialized, so 
implementations of `List` that are not serializable are problems.
   
   What we normally do is use an array for lists that are serialized. Just 
convert this to `String[]` here, and use `String[]` throughout.



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