MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / GetSize

Method GetSize

src/codec/flat_array.h:246–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244
245 private:
246 uint32_t GetSize() {
247 // one byte for column count
248 uint32_t size = 1;
249 if (datas_.size() >= 128) {
250 size++;
251 }
252 std::vector<Column>::iterator it = datas_.begin();
253 for (; it != datas_.end(); ++it) {
254 Column& col = *it;
255 size += (col.buffer.size() + 1 + 1);
256 if (col.buffer.size() >= 128) {
257 size++;
258 }
259 }
260 return size;
261 }
262
263 // encode data to buffer
264 void Encode(const ColType& type, const void* data, uint16_t size) {

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected