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

Method Write

csup/float.go:26–44  ·  view source on GitHub ↗
(vec vector.Any)

Source from the content-addressed store, hash-verified

24}
25
26func (f *FloatEncoder) Write(vec vector.Any) {
27 if vec.Len() == 0 {
28 return
29 }
30 fv := vec.(*vector.Float)
31 if len(f.vals) == 0 {
32 f.min = fv.Values[0]
33 f.max = fv.Values[0]
34 }
35 for _, v := range fv.Values {
36 if v < f.min {
37 f.min = v
38 }
39 if v > f.max {
40 f.max = v
41 }
42 }
43 f.vals = append(f.vals, fv.Values...)
44}
45
46func (f *FloatEncoder) Encode(group *errgroup.Group) {
47 group.Go(func() error {

Callers

nothing calls this directly

Calls 1

LenMethod · 0.65

Tested by

no test coverage detected