| 16 | } |
| 17 | |
| 18 | func (f *FieldEncoder) write(vec vector.Any) { |
| 19 | if opt, ok := vec.(*vector.Optional); ok { |
| 20 | // RLEs have the nice property that you can just concatenate them |
| 21 | // to append two vectors. |
| 22 | // XXX We currently compute the RLE from the Dynamic but Optional needs |
| 23 | // to be updated to keep the RLEs around and materialize the Dynamic on demand. |
| 24 | f.rle = append(f.rle, opt.RLE()...) |
| 25 | vec = opt.Values[0] |
| 26 | |
| 27 | } |
| 28 | f.values.Write(vec) |
| 29 | } |
| 30 | |
| 31 | func (f *FieldEncoder) Metadata(cctx *Context, off uint64) (uint64, Field) { |
| 32 | var nones Segment |