manishmalhotrawork commented on a change in pull request #1471:
URL: https://github.com/apache/iceberg/pull/1471#discussion_r490538944
##########
File path:
spark/src/main/java/org/apache/iceberg/actions/RemoveOrphanFilesAction.java
##########
@@ -254,4 +270,53 @@ private static void listDirRecursively(
return files.iterator();
};
}
+
+ protected static List<String> findOrphanFiles(
+ Dataset<Row> validFileDF,
+ Dataset<Row> actualFileDF) {
+ Column nameEqual = filename.apply(actualFileDF.col(RELATIVE_FILE_PATH))
+ .equalTo(filename.apply(validFileDF.col(RELATIVE_FILE_PATH)));
+
+ Column pathContains = actualFileDF.col(RELATIVE_FILE_PATH)
+ .contains(validFileDF.col(RELATIVE_FILE_PATH));
+
+ Column joinCond = nameEqual.and(pathContains);
Review comment:
@RussellSpitzer `nameEquals` is only for fileName and does not include
path. Also this condition was already there so didnt want to change it.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]