From 030afd266b2d7991e66372d4239f6184928da6e9 Mon Sep 17 00:00:00 2001 From: Jackson Owens Date: Wed, 16 Oct 2024 16:30:31 -0400 Subject: [PATCH] colblk: use UnsafeOffsets.At2 in another instance Use UnsafeOffsets.At2 in another instance within PrefixBytes.Search. --- sstable/colblk/prefix_bytes.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sstable/colblk/prefix_bytes.go b/sstable/colblk/prefix_bytes.go index f55b8e2478..ee9c749ba6 100644 --- a/sstable/colblk/prefix_bytes.go +++ b/sstable/colblk/prefix_bytes.go @@ -552,8 +552,7 @@ func (b *PrefixBytes) Search(k []byte) (rowIndex int, isEqual bool) { // The beginning of the zero-indexed i-th key of the bundle is at // offset(j+i+1). // - hStart := b.rawBytes.offsets.At(j + h + 1) - hEnd := b.rawBytes.offsets.At(j + h + 2) + hStart, hEnd := b.rawBytes.offsets.At2(j + h + 1) // There's a complication with duplicate keys. When keys are repeated, // the PrefixBytes encoding avoids re-encoding the duplicate key, // instead encoding an empty slice. While binary searching, if we land