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

Method getOutput

bolt/exec/Exchange.cpp:126–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126RowVectorPtr Exchange::getOutput() {
127 if (currentPages_.empty()) {
128 return nullptr;
129 }
130
131 uint64_t rawInputBytes{0};
132 vector_size_t resultOffset = 0;
133 for (const auto& page : currentPages_) {
134 rawInputBytes += page->size();
135
136 auto inputStream = page->prepareStreamForDeserialize();
137
138 while (!inputStream->atEnd()) {
139 getSerde()->deserialize(
140 inputStream.get(),
141 pool(),
142 outputType_,
143 &result_,
144 resultOffset,
145 &options_);
146 resultOffset = result_->size();
147 }
148 }
149
150 currentPages_.clear();
151
152 {
153 auto lockedStats = stats_.wlock();
154 lockedStats->rawInputBytes += rawInputBytes;
155 lockedStats->rawInputPositions += result_->size();
156 lockedStats->addInputVector(result_->estimateFlatSize(), result_->size());
157 }
158
159 return result_;
160}
161
162void Exchange::close() {
163 SourceOperator::close();

Callers

nothing calls this directly

Calls 11

getSerdeFunction · 0.85
addInputVectorMethod · 0.80
poolFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45
atEndMethod · 0.45
deserializeMethod · 0.45
getMethod · 0.45
clearMethod · 0.45
estimateFlatSizeMethod · 0.45

Tested by

no test coverage detected