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

Function NewFieldFromRLE

vector/record.go:179–189  ·  view source on GitHub ↗
(sctx *super.Context, vec Any, length uint32, runlens []uint32)

Source from the content-addressed store, hash-verified

177}
178
179func NewFieldFromRLE(sctx *super.Context, vec Any, length uint32, runlens []uint32) Any {
180 if len(runlens) == 0 {
181 return vec
182 }
183 tags, noneLen := buildTags(runlens, length)
184 if noneLen == 0 {
185 // This field is optional but everything is here in this instance.
186 return vec
187 }
188 return &Optional{NewDynamic(tags, []Any{vec, NewNone(sctx, vec.Type(), noneLen)})}
189}
190
191// An Optional value is a special Dynamic that has two tags comprising the
192// values present and the Nones.

Callers 2

projectMethod · 0.92
buildMethod · 0.85

Calls 4

buildTagsFunction · 0.85
NewDynamicFunction · 0.85
NewNoneFunction · 0.85
TypeMethod · 0.65

Tested by

no test coverage detected