@@ -259,11 +259,11 @@ func looseLeftTableBounds(
259259 cmp Compare , originalTable , leftTable * tableMetadata , exciseSpanStart []byte ,
260260) {
261261 if originalTable .HasPointKeys {
262- largestPointKey := originalTable .LargestPointKey
262+ largestPointKey := originalTable .PointKeyBounds . Largest ()
263263 if largestPointKey .IsUpperBoundFor (cmp , exciseSpanStart ) {
264264 largestPointKey = base .MakeRangeDeleteSentinelKey (exciseSpanStart )
265265 }
266- leftTable .ExtendPointKeyBounds (cmp , originalTable .SmallestPointKey , largestPointKey )
266+ leftTable .ExtendPointKeyBounds (cmp , originalTable .PointKeyBounds . Smallest () , largestPointKey )
267267 }
268268 if originalTable .HasRangeKeys {
269269 largestRangeKey := originalTable .RangeKeyBounds .Largest ()
@@ -287,11 +287,11 @@ func looseRightTableBounds(
287287 cmp Compare , originalTable , rightTable * tableMetadata , exciseSpanEnd []byte ,
288288) {
289289 if originalTable .HasPointKeys {
290- smallestPointKey := originalTable .SmallestPointKey
290+ smallestPointKey := originalTable .PointKeyBounds . Smallest ()
291291 if ! smallestPointKey .IsUpperBoundFor (cmp , exciseSpanEnd ) {
292292 smallestPointKey = base .MakeInternalKey (exciseSpanEnd , 0 , base .InternalKeyKindMaxForSSTable )
293293 }
294- rightTable .ExtendPointKeyBounds (cmp , smallestPointKey , originalTable .LargestPointKey )
294+ rightTable .ExtendPointKeyBounds (cmp , smallestPointKey , originalTable .PointKeyBounds . Largest () )
295295 }
296296 if originalTable .HasRangeKeys {
297297 smallestRangeKey := originalTable .RangeKeyBounds .Smallest ()
@@ -311,10 +311,10 @@ func looseRightTableBounds(
311311func determineLeftTableBounds (
312312 cmp Compare , originalTable , leftTable * tableMetadata , exciseSpanStart []byte , iters iterSet ,
313313) error {
314- if originalTable .HasPointKeys && cmp (originalTable .SmallestPointKey .UserKey , exciseSpanStart ) < 0 {
314+ if originalTable .HasPointKeys && cmp (originalTable .PointKeyBounds . Smallest () .UserKey , exciseSpanStart ) < 0 {
315315 // This file will probably contain point keys.
316316 if kv := iters .Point ().SeekLT (exciseSpanStart , base .SeekLTFlagsNone ); kv != nil {
317- leftTable .ExtendPointKeyBounds (cmp , originalTable .SmallestPointKey , kv .K .Clone ())
317+ leftTable .ExtendPointKeyBounds (cmp , originalTable .PointKeyBounds . Smallest () , kv .K .Clone ())
318318 }
319319 rdel , err := iters .RangeDeletion ().SeekLT (exciseSpanStart )
320320 if err != nil {
@@ -327,7 +327,7 @@ func determineLeftTableBounds(
327327 // The key is owned by the range del iter, so we need to copy it.
328328 lastRangeDel = slices .Clone (rdel .End )
329329 }
330- leftTable .ExtendPointKeyBounds (cmp , originalTable .SmallestPointKey ,
330+ leftTable .ExtendPointKeyBounds (cmp , originalTable .PointKeyBounds . Smallest () ,
331331 base .MakeExclusiveSentinelKey (InternalKeyKindRangeDelete , lastRangeDel ))
332332 }
333333 }
@@ -367,12 +367,12 @@ func determineRightTableBounds(
367367 exciseSpanEnd base.UserKeyBoundary ,
368368 iters iterSet ,
369369) error {
370- if originalTable .HasPointKeys && ! exciseSpanEnd .IsUpperBoundForInternalKey (cmp , originalTable .LargestPointKey ) {
370+ if originalTable .HasPointKeys && ! exciseSpanEnd .IsUpperBoundForInternalKey (cmp , originalTable .PointKeyBounds . Largest () ) {
371371 if kv := iters .Point ().SeekGE (exciseSpanEnd .Key , base .SeekGEFlagsNone ); kv != nil {
372372 if exciseSpanEnd .Kind == base .Inclusive && cmp (exciseSpanEnd .Key , kv .K .UserKey ) == 0 {
373373 return base .AssertionFailedf ("cannot excise with an inclusive end key and data overlap at end key" )
374374 }
375- rightTable .ExtendPointKeyBounds (cmp , kv .K .Clone (), originalTable .LargestPointKey )
375+ rightTable .ExtendPointKeyBounds (cmp , kv .K .Clone (), originalTable .PointKeyBounds . Largest () )
376376 }
377377 rdel , err := iters .RangeDeletion ().SeekGE (exciseSpanEnd .Key )
378378 if err != nil {
@@ -390,7 +390,7 @@ func determineRightTableBounds(
390390 rightTable .ExtendPointKeyBounds (cmp , base.InternalKey {
391391 UserKey : firstRangeDel ,
392392 Trailer : rdel .SmallestKey ().Trailer ,
393- }, originalTable .LargestPointKey )
393+ }, originalTable .PointKeyBounds . Largest () )
394394 }
395395 }
396396 if originalTable .HasRangeKeys && ! exciseSpanEnd .IsUpperBoundForInternalKey (cmp , originalTable .RangeKeyBounds .Largest ()) {
0 commit comments