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

Method ConcurrentPull

sbuf/materialize.go:99–112  ·  view source on GitHub ↗
(done bool, _ int)

Source from the content-addressed store, hash-verified

97}
98
99func (d *Dematerializer) ConcurrentPull(done bool, _ int) (vector.Any, error) {
100 d.mu.Lock()
101 batch, err := d.parent.Pull(done)
102 d.mu.Unlock()
103 if batch == nil || err != nil {
104 return nil, err
105 }
106 defer batch.Unref()
107 builder := vector.NewDynamicBuilder()
108 for _, val := range batch.Values() {
109 builder.Write(val)
110 }
111 return builder.Build(d.sctx), nil
112}
113
114func WriteVec(w sio.Writer, vec vector.Any) error {
115 for _, val := range Materialize(vec).Values() {

Callers 1

PullMethod · 0.95

Calls 6

WriteMethod · 0.95
BuildMethod · 0.95
NewDynamicBuilderFunction · 0.92
PullMethod · 0.65
UnrefMethod · 0.65
ValuesMethod · 0.65

Tested by

no test coverage detected