slfan1989 commented on code in PR #659:
URL: https://github.com/apache/iceberg-cpp/pull/659#discussion_r3278451098


##########
src/iceberg/file_io.h:
##########
@@ -154,6 +154,24 @@ class ICEBERG_EXPORT FileIO {
   virtual Status DeleteFile(const std::string& file_location) {
     return NotImplemented("DeleteFile not implemented");
   }
+
+  /// \brief Delete files at the given locations.
+  ///
+  /// Implementations that can delete multiple files efficiently should 
override this
+  /// method. The default implementation deletes files sequentially using 
DeleteFile
+  /// and returns the first error encountered.
+  ///
+  /// \param file_locations The locations of the files to delete.
+  /// \return void if all deletes succeeded, an error code if any delete 
failed.
+  virtual Status DeleteFiles(std::span<const std::string> file_locations) {
+    for (const auto& file_location : file_locations) {
+      auto status = DeleteFile(file_location);

Review Comment:
   Will update it. I'll move the default `DeleteFiles` implementation to 
file_io.cc and use `ICEBERG_RETURN_UNEXPECTED` for error propagation.



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