gaborkaszab commented on code in PR #5159:
URL: https://github.com/apache/iceberg/pull/5159#discussion_r909566933


##########
core/src/main/java/org/apache/iceberg/hadoop/HadoopFileIO.java:
##########
@@ -66,10 +66,19 @@ public OutputFile newOutputFile(String path) {
 
   @Override
   public void deleteFile(String path) {
+    deleteImpl(path, false);
+  }
+
+  @Override
+  public void deleteFolder(String path) {
+    deleteImpl(path, true);
+  }
+
+  private void deleteImpl(String path, boolean recursive) {
     Path toDelete = new Path(path);
     FileSystem fs = Util.getFs(toDelete, hadoopConf.get());
     try {
-      fs.delete(toDelete, false /* not recursive */);
+      fs.delete(toDelete, recursive);

Review Comment:
   For that we would need to list the files in the directory so that we can 
drop them one-by-one. I'd go for simple invoke a recursive drop here.



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