dttung2905 opened a new pull request, #525:
URL: https://github.com/apache/iceberg-go/pull/525

   Hi team,
   
   I believe the `DeleteOrphanFiles` functionality is a valuable addition 
toward making iceberg-go more feature-complete. This implementation was drafted 
with reference to the official [Iceberg Java API 
specification](https://iceberg.apache.org/javadoc/1.2.0/org/apache/iceberg/actions/DeleteOrphanFiles.html).
   
   The PR also includes corresponding unit and integration tests to ensure 
reliability. Below is some example usages:
   ```
   // Example usage:
   
   // Dry run to see what would be deleted
   result, err := table.DeleteOrphanFiles(ctx,
        WithDryRun(true),
        WithOlderThan(time.Now().AddDate(0, 0, -7)),
   )
   
   // Actually delete orphan files with parallel execution
   result, err = table.DeleteOrphanFiles(ctx,
        WithOlderThan(time.Now().AddDate(0, 0, -3)),
        WithMaxConcurrency(8),
   )
   
   // Advanced usage with scheme equivalence and prefix mismatch handling
   result, err = table.DeleteOrphanFiles(ctx,
        WithLocation("s3://my-bucket/table/data"),
        WithOlderThan(time.Now().AddDate(0, 0, -7)),
        WithEqualSchemes(map[string]string{"s3,s3a,s3n": "s3"}),
        WithPrefixMismatchMode(PrefixMismatchIgnore),
        WithDeleteFunc(customDeleteFunction),
   )
   
   ```


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