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

Method Pull

sbuf/batch.go:77–101  ·  view source on GitHub ↗
(done bool)

Source from the content-addressed store, hash-verified

75}
76
77func (p *puller) Pull(done bool) (Batch, error) {
78 if done {
79 p.zr = nil
80 }
81 if p.zr == nil {
82 return nil, nil
83 }
84 batch := newPullerBatch()
85 for {
86 val, err := p.zr.Read()
87 if err != nil {
88 return nil, err
89 }
90 if val == nil {
91 p.zr = nil
92 if len(batch.vals) == 0 {
93 return nil, nil
94 }
95 return batch, nil
96 }
97 if batch.appendVal(*val) {
98 return batch, nil
99 }
100 }
101}
102
103type pullerBatch struct {
104 buf []byte

Callers 2

runMethod · 0.95
runMethod · 0.95

Calls 3

newPullerBatchFunction · 0.85
appendValMethod · 0.80
ReadMethod · 0.65

Tested by

no test coverage detected