Skip to content

Commit

Permalink
colblk: use UnsafeOffsets.At2 in another instance
Browse files Browse the repository at this point in the history
Use UnsafeOffsets.At2 in another instance within PrefixBytes.Search.
  • Loading branch information
jbowens committed Oct 16, 2024
1 parent b3993ff commit 030afd2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sstable/colblk/prefix_bytes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 030afd2

Please sign in to comment.