Next implements chunkenc.Iterator.
()
| 137 | |
| 138 | // Next implements chunkenc.Iterator. |
| 139 | func (a *iteratorAdapter) Next() chunkenc.ValueType { |
| 140 | a.curr.Index++ |
| 141 | for a.curr.Index >= a.curr.Length && a.underlying.Next(a.batchSize) != chunkenc.ValNone { |
| 142 | a.curr = a.underlying.Batch() |
| 143 | a.batchSize = min(a.batchSize*2, chunk.BatchSize) |
| 144 | } |
| 145 | if a.curr.Index < a.curr.Length { |
| 146 | return a.curr.ValType |
| 147 | } |
| 148 | return chunkenc.ValNone |
| 149 | } |
| 150 | |
| 151 | // At implements chunkenc.Iterator. |
| 152 | func (a *iteratorAdapter) At() (int64, float64) { |