Skip to content
This repository was archived by the owner on Aug 13, 2019. It is now read-only.

Commit d097d3f

Browse files
committed
Return not implemented error on vertical iterators for not used chunk method.
Signed-off-by: Bartek Plotka <[email protected]>
1 parent 4ed00e1 commit d097d3f

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

querier.go

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -990,12 +990,10 @@ func (s *verticalChainedSeries) Iterator() SeriesIterator {
990990
return newVerticalMergeSeriesIterator(s.series...)
991991
}
992992

993+
// ChunkIterator is currently not implemented.
994+
// TODO(bwplotka): Implement once we will want to use chunks in vertical compaction.
993995
func (s *verticalChainedSeries) ChunkIterator() ChunkIterator {
994-
ch := &chainedChunkIterator{chain: make([]ChunkIterator, 0, len(s.series))}
995-
for _, s := range s.series {
996-
ch.chain = append(ch.chain, s.ChunkIterator())
997-
}
998-
return ch
996+
return errChunkIterator{err: errors.New("Not Implemented")}
999997
}
1000998

1001999
// verticalMergeSeriesIterator implements a series iterater over a list
@@ -1244,6 +1242,14 @@ type ChunkIterator interface {
12441242
Err() error
12451243
}
12461244

1245+
type errChunkIterator struct {
1246+
err error
1247+
}
1248+
1249+
func (s errChunkIterator) Next() bool { return false }
1250+
func (s errChunkIterator) At() chunks.Meta { return chunks.Meta{} }
1251+
func (s errChunkIterator) Err() error { return s.err }
1252+
12471253
type chunkIterator struct {
12481254
chunks []chunks.Meta // series in time order
12491255
i int

0 commit comments

Comments
 (0)