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

Method Fetch

runtime/vcache/object.go:59–65  ·  view source on GitHub ↗

Fetch returns the indicated projection of data in this CSUP object. If any required data is not memory resident, it will be fetched from storage and cached in memory so that subsequent calls run from memory. The vectors returned will have types from the provided sctx. Multiple Fetch calls to the sa

(sctx *super.Context, projection field.Projection)

Source from the content-addressed store, hash-verified

57// The vectors returned will have types from the provided sctx. Multiple
58// Fetch calls to the same object may run concurrently.
59func (o *Object) Fetch(sctx *super.Context, projection field.Projection) (vector.Any, error) {
60 cctx := o.object.Context()
61 loader := &loader{cctx, sctx, o.object.DataReader()}
62 o.root = newShadow(cctx, o.object.Root())
63 o.root.unmarshal(cctx, projection)
64 return loader.load(projection, o.root)
65}
66
67// FetchUnordered is like Fetch, but if o's root vector is dynamic,
68// FetchUnordered returns the underlying values vectors instead of a

Callers

nothing calls this directly

Calls 6

loadMethod · 0.95
newShadowFunction · 0.85
ContextMethod · 0.80
DataReaderMethod · 0.80
RootMethod · 0.65
unmarshalMethod · 0.65

Tested by

no test coverage detected