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

Method Write

csup/dynamic.go:31–40  ·  view source on GitHub ↗

The dynamic encoder self-organizes around the types that are written to it. No need to define the schema up front! We track the types seen first-come, first-served and the CSUP metadata structure follows accordingly.

(vec vector.Any)

Source from the content-addressed store, hash-verified

29// We track the types seen first-come, first-served and the
30// CSUP metadata structure follows accordingly.
31func (d *DynamicEncoder) Write(vec vector.Any) {
32 if vec.Len() == 0 {
33 return
34 }
35 if dynamic, ok := vec.(*vector.Dynamic); ok {
36 d.appendDynamic(dynamic)
37 } else {
38 d.appendVec(vec)
39 }
40}
41
42func (d *DynamicEncoder) appendDynamic(vec *vector.Dynamic) {
43 var tagmap []uint32 // input tags to local tags

Callers

nothing calls this directly

Calls 3

appendDynamicMethod · 0.95
appendVecMethod · 0.95
LenMethod · 0.65

Tested by

no test coverage detected