slfan1989 opened a new issue, #2832: URL: https://github.com/apache/iceberg-go/issues/2832
### Apache Iceberg version main (development) ### Please describe the bug 🐞 ### What happens Compaction selects data files that meet `DeleteFileThreshold` or `DeleteRatioThreshold`, but it can discard them when the partition or packed group contains fewer than `MinInputFiles` files. This leaves files with substantial deleted data out of the rewrite plan. ### Steps to reproduce 1. Use `compaction.DefaultConfig()`, which sets `MinInputFiles` to 5 and `DeleteRatioThreshold` to 0.3. 2. Call `Config.PlanCompaction` with a single scan task for a 500 MiB data file containing 100 rows. Attach a deletion vector that marks 40 rows as deleted. 3. Inspect the resulting plan. ### Actual behavior The plan contains zero rewrite groups and reports one skipped file, even though the file's 40% delete ratio exceeds the configured threshold. The same issue affects the delete-file count threshold. It also occurs after bin packing. For example, five 500 MiB files that meet the delete threshold pass the partition-level check, then all five single-file groups are dropped. ### Expected behavior Keep rewrite groups that contain a file meeting either delete threshold, even when the group has fewer than `MinInputFiles` files. Groups selected solely because their files are undersized should continue to respect `MinInputFiles`. -- 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]
