RussellSpitzer commented on code in PR #7914:
URL: https://github.com/apache/iceberg/pull/7914#discussion_r1248309832


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/actions/DeleteOrphanFilesSparkAction.java:
##########
@@ -303,6 +304,19 @@ private Dataset<String> listedFileDS() {
     List<String> subDirs = Lists.newArrayList();
     List<String> matchingFiles = Lists.newArrayList();
 
+    if (table.io() instanceof SupportsPrefixOperations) {
+      Iterator<org.apache.iceberg.io.FileInfo> iterator = 
((SupportsPrefixOperations) table.io()).listPrefix(location).iterator();

Review Comment:
   I think this is a good start but I would ask that we only make the change in 
v3.4 to start (we can backport level)
   
   In addition can we set this up without the early exit?
   
   Ie
   ```java
   If (table.io supportsPrefix)
    files = listPrefix()
   else
     files = listNoPrefix()
     }
     
     spark.createDataset(files)
     ```
     
     We also need a test which exercises this code path, (Does HadoopFS do this 
by default? If So do we have a test for the other path:noprefix)
   



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