MCPcopy Create free account
hub / github.com/brimdata/super / Read

Method Read

sbuf/batch.go:183–200  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

181}
182
183func (r *pullerReader) Read() (*super.Value, error) {
184 // Loop handles zero-length batches.
185 for len(r.vals) == 0 {
186 if r.batch != nil {
187 r.batch.Unref()
188 r.batch = nil
189 }
190 batch, err := r.p.Pull(false)
191 if batch == nil || err != nil {
192 return nil, err
193 }
194 r.batch = batch
195 r.vals = batch.Values()
196 }
197 val := &r.vals[0]
198 r.vals = r.vals[1:]
199 return val, nil
200}
201
202type batch struct {
203 Batch

Callers

nothing calls this directly

Calls 3

UnrefMethod · 0.65
PullMethod · 0.65
ValuesMethod · 0.65

Tested by

no test coverage detected