storage: simplify Seek on BufferedSeriesIterator

Small tweak to call a simpler method

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
pull/12716/head
Bryan Boreham 2023-08-17 07:42:18 +01:00
parent d6e1b1acdb
commit a018a7ef53
1 changed files with 2 additions and 6 deletions

View File

@ -92,12 +92,8 @@ func (b *BufferedSeriesIterator) Seek(t int64) chunkenc.ValueType {
switch b.valueType {
case chunkenc.ValNone:
return chunkenc.ValNone
case chunkenc.ValFloat:
b.lastTime, _ = b.At()
case chunkenc.ValHistogram:
b.lastTime, _ = b.AtHistogram()
case chunkenc.ValFloatHistogram:
b.lastTime, _ = b.AtFloatHistogram()
case chunkenc.ValFloat, chunkenc.ValHistogram, chunkenc.ValFloatHistogram:
b.lastTime = b.AtT()
default:
panic(fmt.Errorf("BufferedSeriesIterator: unknown value type %v", b.valueType))
}