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

Method Metadata

csup/dict.go:61–78  ·  view source on GitHub ↗
(cctx *Context, off uint64)

Source from the content-addressed store, hash-verified

59}
60
61func (d *DictEncoder) Metadata(cctx *Context, off uint64) (uint64, ID) {
62 if d.const_ != nil {
63 return off, cctx.enter(d.const_)
64 }
65 if d.counts == nil {
66 return d.PrimitiveEncoder.Metadata(cctx, off)
67 }
68 meta := &Dict{Length: uint32(len(d.index))}
69 off, meta.Values = d.PrimitiveEncoder.Metadata(cctx, off)
70 off, meta.Counts = d.counts.Segment(off)
71 len := uint64(len(d.index))
72 meta.Index = Segment{
73 Offset: off,
74 Length: len,
75 MemLength: len,
76 }
77 return off + len, cctx.enter(meta)
78}
79
80func (d *DictEncoder) Emit(w io.Writer) error {
81 if d.const_ != nil {

Callers

nothing calls this directly

Calls 3

SegmentMethod · 0.80
MetadataMethod · 0.65
enterMethod · 0.45

Tested by

no test coverage detected