From 237bfea46b59600cca77520de033d8896f6d3aeb Mon Sep 17 00:00:00 2001 From: Arve Knudsen Date: Tue, 28 Nov 2023 16:33:28 +0100 Subject: [PATCH] `chunks.Reader`: Fix typo in ChunkOrIterable doc string. Also fix comment typo in `FloatHistogram.Sub`. Signed-off-by: Arve Knudsen --- model/histogram/float_histogram.go | 2 +- tsdb/chunks/chunks.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/model/histogram/float_histogram.go b/model/histogram/float_histogram.go index 1c2f3ebec..cf20b5080 100644 --- a/model/histogram/float_histogram.go +++ b/model/histogram/float_histogram.go @@ -303,7 +303,7 @@ func (h *FloatHistogram) Sub(other *FloatHistogram) *FloatHistogram { ) if other.Schema < h.Schema { - panic(fmt.Errorf("cannot subtract histigram with schema %d to %d", other.Schema, h.Schema)) + panic(fmt.Errorf("cannot subtract histogram with schema %d to %d", other.Schema, h.Schema)) } else if other.Schema > h.Schema { otherPositiveSpans, otherPositiveBuckets = reduceResolution(otherPositiveSpans, otherPositiveBuckets, other.Schema, h.Schema, false, false) otherNegativeSpans, otherNegativeBuckets = reduceResolution(otherNegativeSpans, otherNegativeBuckets, other.Schema, h.Schema, false, false) diff --git a/tsdb/chunks/chunks.go b/tsdb/chunks/chunks.go index f22285a0c..2c6db3637 100644 --- a/tsdb/chunks/chunks.go +++ b/tsdb/chunks/chunks.go @@ -671,7 +671,7 @@ func (s *Reader) Size() int64 { return s.size } -// Chunk returns a chunk from a given reference. +// ChunkOrIterable returns a chunk from a given reference. func (s *Reader) ChunkOrIterable(meta Meta) (chunkenc.Chunk, chunkenc.Iterable, error) { sgmIndex, chkStart := BlockChunkRef(meta.Ref).Unpack()