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

Method project

runtime/vcache/bytes.go:29–44  ·  view source on GitHub ↗
(loader *loader, projection field.Projection)

Source from the content-addressed store, hash-verified

27func (*bytes) unmarshal(*csup.Context, field.Projection) {}
28
29func (b *bytes) project(loader *loader, projection field.Projection) vector.Any {
30 if len(projection) > 0 {
31 return vector.NewMissing(loader.sctx, b.length())
32 }
33 table := b.load(loader)
34 switch b.meta.Typ.ID() {
35 case super.IDString:
36 return vector.NewString(table)
37 case super.IDBytes:
38 return vector.NewBytes(table)
39 case super.IDType:
40 return vector.NewTypeValue(table)
41 default:
42 panic(b.meta.Typ)
43 }
44}
45
46func (b *bytes) load(loader *loader) vector.BytesTable {
47 b.mu.Lock()

Callers

nothing calls this directly

Calls 7

lengthMethod · 0.95
loadMethod · 0.95
NewMissingFunction · 0.92
NewStringFunction · 0.92
NewBytesFunction · 0.92
NewTypeValueFunction · 0.92
IDMethod · 0.65

Tested by

no test coverage detected