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

Method serialize

bolt/exec/tests/ContainerRowSerdeTest.cpp:57–68  ·  view source on GitHub ↗

Writes all rows together and returns a position at the start of this combined write.

Source from the content-addressed store, hash-verified

55 // Writes all rows together and returns a position at the start of this
56 // combined write.
57 HashStringAllocator::Position serialize(
58 const VectorPtr& data,
59 bool isKey = true) {
60 ByteOutputStream out(&allocator_);
61 auto position = allocator_.newWrite(out);
62 const ContainerRowSerdeOptions options{.isKey = isKey};
63 for (auto i = 0; i < data->size(); ++i) {
64 ContainerRowSerde::serialize(*data, i, out, options);
65 }
66 allocator_.finishWrite(out, 0);
67 return position;
68 }
69
70 // Writes each row individually and returns positions for individual rows.
71 std::vector<HashStringAllocator::Position> serializeWithPositions(

Callers

nothing calls this directly

Calls 4

newWriteMethod · 0.80
finishWriteMethod · 0.80
serializeFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected