Merge pull request #12716 from bboreham/simplify-seek
storage: simplify Seek on BufferedSeriesIterator
This commit is contained in:
commit
ade2ee3fe4
|
@ -91,12 +91,8 @@ func (b *BufferedSeriesIterator) Seek(t int64) chunkenc.ValueType {
|
||||||
switch b.valueType {
|
switch b.valueType {
|
||||||
case chunkenc.ValNone:
|
case chunkenc.ValNone:
|
||||||
return chunkenc.ValNone
|
return chunkenc.ValNone
|
||||||
case chunkenc.ValFloat:
|
case chunkenc.ValFloat, chunkenc.ValHistogram, chunkenc.ValFloatHistogram:
|
||||||
b.lastTime, _ = b.At()
|
b.lastTime = b.AtT()
|
||||||
case chunkenc.ValHistogram:
|
|
||||||
b.lastTime, _ = b.AtHistogram()
|
|
||||||
case chunkenc.ValFloatHistogram:
|
|
||||||
b.lastTime, _ = b.AtFloatHistogram()
|
|
||||||
default:
|
default:
|
||||||
panic(fmt.Errorf("BufferedSeriesIterator: unknown value type %v", b.valueType))
|
panic(fmt.Errorf("BufferedSeriesIterator: unknown value type %v", b.valueType))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue