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

Method writeTable

csup/bytes.go:48–65  ·  view source on GitHub ↗
(table vector.BytesTable)

Source from the content-addressed store, hash-verified

46}
47
48func (b *BytesEncoder) writeTable(table vector.BytesTable) {
49 if len(b.bytes) == 0 {
50 val := table.Bytes(0)
51 b.min = append(b.min[:0], val...)
52 b.max = append(b.max[:0], val...)
53 }
54 for slot := range table.Len() {
55 val := table.Bytes(slot)
56 if bytes.Compare(val, b.min) < 0 {
57 b.min = append(b.min[:0], val...)
58 }
59 if bytes.Compare(val, b.max) > 0 {
60 b.max = append(b.max[:0], val...)
61 }
62 }
63 b.bytes = append(b.bytes, table.RawBytes()...)
64 b.offsets.write(table.RawOffsets())
65}
66
67func (b *BytesEncoder) Encode(group *errgroup.Group) {
68 group.Go(func() error {

Callers 1

WriteMethod · 0.95

Calls 6

RawBytesMethod · 0.80
RawOffsetsMethod · 0.80
LenMethod · 0.65
BytesMethod · 0.45
CompareMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected