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

Method noMoreInput

bolt/exec/SortWindowBuild.cpp:229–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229void SortWindowBuild::noMoreInput() {
230 if (numRows_ == 0) {
231 return;
232 }
233
234 if (sortSpiller_ != nullptr) {
235 finishLoadFromSpill_ = false;
236 return;
237
238 } else {
239 // At this point we have seen all the input rows which are sorted. This will
240 // compute the index for each partition.
241 computePartitionStartRows();
242 clearTopRows();
243 }
244}
245
246void SortWindowBuild::finish() {
247 for (int i = 0; i < allocatedSizes_.size(); i++) {
248 if (allocatedSizes_[i] == 0) {
249 continue;
250 }
251 data_->pool()->free(allocatedStarts_[i], allocatedSizes_[i]);
252 allocatedSizes_[i] = 0;
253 }
254 sortRows_.clear();
255 allocatedStarts_.clear();
256 allocatedSizes_.clear();
257 numBuffers_.clear();
258 data_->clear();
259 data_->pool()->release();
260}
261

Callers

nothing calls this directly

Calls 3

listAllRowsMethod · 0.80
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected