MCPcopy Create free account
hub / github.com/bytedance/bolt / writeRowVector

Function writeRowVector

bolt/vector/VectorSaver.cpp:429–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427}
428
429void writeRowVector(const BaseVector& vector, std::ostream& out) {
430 // Nulls buffer.
431 writeOptionalBuffer(vector.nulls(), out);
432
433 const auto* rowVector = vector.as<RowVector>();
434 BOLT_CHECK_NOT_NULL(
435 rowVector, "Expected a RowVector, got: {}", vector.toString());
436
437 // Child vectors.
438 auto numChildren = rowVector->childrenSize();
439 write<int32_t>(numChildren, out);
440
441 for (auto i = 0; i < numChildren; ++i) {
442 const auto& child = rowVector->childAt(i);
443
444 write<bool>(child != nullptr, out);
445 if (child) {
446 saveVector(*child, out);
447 }
448 }
449}
450
451VectorPtr readRowVector(
452 const TypePtr& type,

Callers 1

saveVectorFunction · 0.85

Calls 6

writeOptionalBufferFunction · 0.85
saveVectorFunction · 0.85
childAtMethod · 0.80
nullsMethod · 0.45
toStringMethod · 0.45
childrenSizeMethod · 0.45

Tested by

no test coverage detected