karuppayya commented on code in PR #4652:
URL: https://github.com/apache/iceberg/pull/4652#discussion_r925010212
##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/actions/DeleteOrphanFilesSparkAction.java:
##########
@@ -94,15 +100,10 @@
extends BaseSparkAction<DeleteOrphanFilesSparkAction> implements
DeleteOrphanFiles {
private static final Logger LOG =
LoggerFactory.getLogger(DeleteOrphanFilesSparkAction.class);
- private static final UserDefinedFunction filenameUDF = functions.udf((String
path) -> {
- int lastIndex = path.lastIndexOf(File.separator);
- if (lastIndex == -1) {
- return path;
- } else {
- return path.substring(lastIndex + 1);
- }
- }, DataTypes.StringType);
+ private PrefixMismatchMode prefixMismatchMode = PrefixMismatchMode.ERROR;
Review Comment:
done
##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/actions/DeleteOrphanFilesSparkAction.java:
##########
@@ -143,6 +144,24 @@ public DeleteOrphanFilesSparkAction
executeDeleteWith(ExecutorService executorSe
return this;
}
+ @Override
+ public DeleteOrphanFiles prefixMismatchMode(PrefixMismatchMode mismatchMode)
{
Review Comment:
done
##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/actions/DeleteOrphanFilesSparkAction.java:
##########
@@ -143,6 +144,24 @@ public DeleteOrphanFilesSparkAction
executeDeleteWith(ExecutorService executorSe
return this;
}
+ @Override
+ public DeleteOrphanFiles prefixMismatchMode(PrefixMismatchMode mismatchMode)
{
+ this.prefixMismatchMode = mismatchMode;
+ return this;
+ }
+
+ @Override
+ public DeleteOrphanFiles equalSchemes(Map<String, String> schemes) {
Review Comment:
done
--
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]