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