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

Method write

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

Source from the content-addressed store, hash-verified

16}
17
18func (f *FieldEncoder) write(vec vector.Any) {
19 if opt, ok := vec.(*vector.Optional); ok {
20 // RLEs have the nice property that you can just concatenate them
21 // to append two vectors.
22 // XXX We currently compute the RLE from the Dynamic but Optional needs
23 // to be updated to keep the RLEs around and materialize the Dynamic on demand.
24 f.rle = append(f.rle, opt.RLE()...)
25 vec = opt.Values[0]
26
27 }
28 f.values.Write(vec)
29}
30
31func (f *FieldEncoder) Metadata(cctx *Context, off uint64) (uint64, Field) {
32 var nones Segment

Callers

nothing calls this directly

Calls 2

RLEMethod · 0.80
WriteMethod · 0.65

Tested by

no test coverage detected