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

Method createOrderedReader

bolt/exec/Spill.cpp:427–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425}
426
427std::unique_ptr<TreeOfLosers<SpillMergeStream>>
428SpillPartition::createOrderedReader(
429 memory::MemoryPool* pool,
430 bool spillUringEnabled) {
431 std::vector<std::unique_ptr<SpillMergeStream>> streams;
432 streams.reserve(files_.size());
433 for (auto& fileInfo : files_) {
434 auto startCreateReadFile = getCurrentTimeMicro();
435 auto spillReadFile =
436 SpillReadFile::create(fileInfo, pool, spillUringEnabled);
437 streams.push_back(FileSpillMergeStream::createWithInitTime(
438 std::move(spillReadFile), getCurrentTimeMicro() - startCreateReadFile));
439 }
440 files_.clear();
441 // Check if the partition is empty or not.
442 if (FOLLY_UNLIKELY(streams.empty())) {
443 return nullptr;
444 }
445 return std::make_unique<TreeOfLosers<SpillMergeStream>>(std::move(streams));
446}
447
448std::unique_ptr<TreeOfLosers<RowBasedSpillMergeStream>>
449SpillPartition::createRowBasedOrderedReader(

Callers 10

noMoreInputCommonMethod · 0.80
finishSpillMethod · 0.80
getOutputWithSpillMethod · 0.80
noMoreInputMethod · 0.80
spillStateTestMethod · 0.80
TEST_PFunction · 0.80
verifySortedSpillDataMethod · 0.80
TEST_PFunction · 0.80
verifySortedSpillDataMethod · 0.80
TEST_PFunction · 0.80

Calls 7

getCurrentTimeMicroFunction · 0.85
createFunction · 0.50
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
clearMethod · 0.45
emptyMethod · 0.45

Tested by 6

spillStateTestMethod · 0.64
TEST_PFunction · 0.64
verifySortedSpillDataMethod · 0.64
TEST_PFunction · 0.64
verifySortedSpillDataMethod · 0.64
TEST_PFunction · 0.64