pvary commented on code in PR #5159:
URL: https://github.com/apache/iceberg/pull/5159#discussion_r909555101
##########
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:
Is the directory empty here?
If not, could we first remove the files in 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.
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]