gaborkaszab commented on PR #11837:
URL: https://github.com/apache/iceberg/pull/11837#issuecomment-2693931184

   > Why did you decide against an util method? The code is really very similar 
to the orphan file removal stuff
   
   I figured that first we should agree on the approach, because last time we 
were talking about retries and batch deletes. So once the approach is fine we 
could think about refactoring this and moving code to a common util.
   
   However, I checked the code and apparently there are multiple places where 
we apply a very similar logic so I thought that we might want to merge this PR 
without the refactor, and then as a next step I could take a look at moving all 
these occurrences into a common util class.
   
[DeleteOrphanFilesSparkAction](https://github.com/apache/iceberg/blob/main/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/DeleteOrphanFilesSparkAction.java#L253)
 for multiple versions, 
[CatalogUtil.deleteFiles()](https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/CatalogUtil.java#L204),
 
[SparkCleanupUtil](https://github.com/apache/iceberg/blob/main/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkCleanupUtil.java#L89)
 for multiple versions, 
[DeleteReachableFilesSparkAction](https://github.com/apache/iceberg/blob/main/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/DeleteReachableFilesSparkAction.java#L130)
 for multiple versions, and there might be more. Not all of them allow a 
pluggable `deleteFunc`, but they could still use the common implementation 
providing `null`.
   
   WDYT?


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to