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

Method serialize

bolt/vector/VectorStream.cpp:47–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 : pool_(pool), serde_(serde), options_(options) {}
46
47 void serialize(
48 const RowVectorPtr& vector,
49 const folly::Range<const IndexRange*>& ranges,
50 Scratch& scratch,
51 OutputStream* stream) override {
52 size_t numRows = 0;
53 for (const auto& range : ranges) {
54 numRows += range.size;
55 }
56
57 StreamArena arena(pool_);
58 auto serializer = serde_->createSerializer(
59 asRowType(vector->type()), numRows, &arena, options_);
60 serializer->append(vector, ranges, scratch);
61 serializer->flush(stream);
62 }
63
64 private:
65 memory::MemoryPool* const pool_;

Callers

nothing calls this directly

Calls 5

asRowTypeFunction · 0.85
createSerializerMethod · 0.45
typeMethod · 0.45
appendMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected