This is an automated email from the ASF dual-hosted git repository.

laskoviymishka pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-go.git


The following commit(s) were added to refs/heads/main by this push:
     new 316afce3a perf(compaction): scan survivor minimum directly (#2137)
316afce3a is described below

commit 316afce3a023089793bdb7d59cf20468f632fa49
Author: Minh Vu <[email protected]>
AuthorDate: Wed Oct 7 13:55:14 2026 +0200

    perf(compaction): scan survivor minimum directly (#2137)
    
    Signed-off-by: Minh Vu <[email protected]>
---
 table/compaction/eq_delete_decision.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/table/compaction/eq_delete_decision.go 
b/table/compaction/eq_delete_decision.go
index 26c14025b..9fbd068ac 100644
--- a/table/compaction/eq_delete_decision.go
+++ b/table/compaction/eq_delete_decision.go
@@ -19,7 +19,6 @@ package compaction
 
 import (
        "fmt"
-       "maps"
        "math"
        "slices"
 
@@ -105,11 +104,12 @@ func (s *SurvivorSurvey) AddSurvivorWithSpec(specID 
int32, partition map[int]any
 }
 
 func (s *SurvivorSurvey) conservativeMinSeq() int64 {
-       if len(s.PartMinSeq) == 0 {
-               return s.EmptyPartMinSeq
+       minSeq := s.EmptyPartMinSeq
+       for _, seq := range s.PartMinSeq {
+               minSeq = min(minSeq, seq)
        }
 
-       return min(s.EmptyPartMinSeq, 
slices.Min(slices.Collect(maps.Values(s.PartMinSeq))))
+       return minSeq
 }
 
 func (s *SurvivorSurvey) specAwareApplicableMinSeq(

Reply via email to