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

Method toSerializedPage

bolt/exec/tests/ExchangeClientTest.cpp:62–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60 }
61
62 std::unique_ptr<SerializedPage> toSerializedPage(const RowVectorPtr& vector) {
63 auto data = std::make_unique<VectorStreamGroup>(pool());
64 auto size = vector->size();
65 auto range = IndexRange{0, size};
66 data->createStreamTree(asRowType(vector->type()), size);
67 data->append(vector, folly::Range(&range, 1));
68 auto listener = bufferManager_->newListener();
69 IOBufOutputStream stream(*pool(), listener.get(), data->size());
70 data->flush(&stream);
71 return std::make_unique<SerializedPage>(stream.getIOBuf(), nullptr, size);
72 }
73
74 std::shared_ptr<Task> makeTask(
75 const std::string& taskId,

Callers

nothing calls this directly

Calls 11

asRowTypeFunction · 0.85
createStreamTreeMethod · 0.80
newListenerMethod · 0.80
poolFunction · 0.50
RangeClass · 0.50
sizeMethod · 0.45
typeMethod · 0.45
appendMethod · 0.45
getMethod · 0.45
flushMethod · 0.45
getIOBufMethod · 0.45

Tested by

no test coverage detected