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

Method Write

csup/fusion.go:29–42  ·  view source on GitHub ↗
(vec vector.Any)

Source from the content-addressed store, hash-verified

27}
28
29func (f *FusionEncoder) Write(vec vector.Any) {
30 if vec.Len() == 0 {
31 return
32 }
33 fusion := vec.(*vector.Fusion)
34 f.values.Write(fusion.Values)
35 //XXX calling SubTypes is a slow path... we should have another
36 // method on vector.TypeLoader that can just return the type IDs
37 // as a slice and lookup the interned CSUP type table and copy
38 // what is needed.
39 for _, typ := range fusion.Subtypes() {
40 f.subtypes = append(f.subtypes, f.cctx.lookupTypeID(fusion.Sctx, typ))
41 }
42}
43
44func (f *FusionEncoder) Emit(w io.Writer) error {
45 if err := f.values.Emit(w); err != nil {

Callers

nothing calls this directly

Calls 4

SubtypesMethod · 0.80
lookupTypeIDMethod · 0.80
LenMethod · 0.65
WriteMethod · 0.65

Tested by

no test coverage detected