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

Method Serialize

vector/record.go:44–68  ·  view source on GitHub ↗
(b *scode.Builder, slot uint32)

Source from the content-addressed store, hash-verified

42}
43
44func (r *Record) Serialize(b *scode.Builder, slot uint32) {
45 b.BeginContainer()
46 if r.Typ.Opts != 0 {
47 // XXX TBD: improve performance of this in summit
48 var nones []int
49 var optOff int
50 for k := range r.Fields {
51 if r.Typ.Fields[k].Opt {
52 if isNone(r.Fields[k], slot) {
53 nones = append(nones, optOff)
54 optOff++
55 continue
56 }
57 optOff++
58 }
59 r.Fields[k].Serialize(b, uint32(slot))
60 }
61 b.EndContainerWithNones(r.Typ.Opts, nones)
62 return
63 }
64 for _, f := range r.Fields {
65 f.Serialize(b, slot)
66 }
67 b.EndContainer()
68}
69
70func buildTags(runlens []uint32, n uint32) ([]uint32, uint32) {
71 tags := make([]uint32, n)

Callers

nothing calls this directly

Calls 5

isNoneFunction · 0.85
BeginContainerMethod · 0.80
EndContainerWithNonesMethod · 0.80
EndContainerMethod · 0.80
SerializeMethod · 0.65

Tested by

no test coverage detected