From 5d84e5d89589bc9ae29a514566cca4c2c7b115f5 Mon Sep 17 00:00:00 2001 From: Bartlomiej Plotka Date: Tue, 11 Feb 2020 20:31:17 +0000 Subject: [PATCH] Make chunkenc.Iterator.At behaviour unspecified without Next done. Signed-off-by: Bartlomiej Plotka --- tsdb/chunkenc/chunk.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tsdb/chunkenc/chunk.go b/tsdb/chunkenc/chunk.go index 8f5f8ea77..54885648c 100644 --- a/tsdb/chunkenc/chunk.go +++ b/tsdb/chunkenc/chunk.go @@ -81,11 +81,9 @@ type Iterator interface { // If current sample found by previous `Next` or `Seek` operation already has this property, Seek has no effect. // Seek returns true, if such sample exists, false otherwise. // Iterator is exhausted when the Seek returns false. - // TODO(bwplotka): Verify above statements on all implementations with unit test. Seek(t int64) bool // At returns the current timestamp/value pair. - // At returns (math.MinInt64, 0.0) before the iterator has advanced. - // TODO(bwplotka): Verify above statement on all implementations with unit test. + // Before the iterator has advanced At behaviour is unspecified. At() (int64, float64) // Err returns the current error. It should be used only after iterator is // exhausted, so `Next` or `Seek` returns false.