twuebi commented on code in PR #1296:
URL: https://github.com/apache/iceberg-go/pull/1296#discussion_r3467894713


##########
table/compaction/compaction.go:
##########
@@ -85,19 +94,24 @@ const (
 
        // DefaultPackingLookback is the default packing lookback.
        DefaultPackingLookback uint = 128
+
+       // DefaultDeleteRatioThreshold mirrors Java's delete-ratio default: a 
file
+       // whose deletion vector shadows at least 30% of its rows is rewritten.
+       DefaultDeleteRatioThreshold = 0.3

Review Comment:
   fixed



##########
table/compaction/compaction_test.go:
##########
@@ -261,6 +308,109 @@ func TestPlanCompaction_DeleteFilesForcesCompaction(t 
*testing.T) {
        assert.Equal(t, 25, totalDeletes)
 }
 
+// dvRatioConfig sizes files (500 MB) well under target (2600 MB) so candidates
+// co-pack into one bin, while keeping each file right-sized (>= 384 MB min) so
+// size-based selection alone would skip it — isolating the deletion-vector
+// ratio as the only thing that can force compaction.
+func dvRatioConfig() compaction.Config {
+       return compaction.Config{
+               TargetFileSizeBytes:  2600 * 1024 * 1024,
+               MinFileSizeBytes:     384 * 1024 * 1024,
+               MaxFileSizeBytes:     3000 * 1024 * 1024,
+               MinInputFiles:        2,
+               DeleteFileThreshold:  5,
+               DeleteRatioThreshold: 0.3,

Review Comment:
   fixed



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