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

Method createUnorderedReader

bolt/exec/Spill.cpp:313–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311}
312
313std::unique_ptr<UnorderedStreamReader<BatchStream>>
314SpillPartition::createUnorderedReader(
315 memory::MemoryPool* pool,
316 bool spillUringEnabled,
317 bool isRowBased) {
318 BOLT_CHECK_NOT_NULL(pool);
319 std::vector<std::unique_ptr<BatchStream>> streams;
320 streams.reserve(files_.size());
321 for (auto& fileInfo : files_) {
322 if (isRowBased) {
323 streams.push_back(RowBasedFileSpillBatchStream::create(
324 RowBasedSpillReadFile::create(fileInfo, pool, spillUringEnabled)));
325 } else {
326 streams.push_back(FileSpillBatchStream::create(
327 SpillReadFile::create(fileInfo, pool, spillUringEnabled)));
328 }
329 }
330 files_.clear();
331 return std::make_unique<UnorderedStreamReader<BatchStream>>(
332 std::move(streams));
333}
334
335uint32_t FileSpillMergeStream::id() const {
336 BOLT_CHECK(!closed_);

Callers 9

buildNextPartitionMethod · 0.80
maybeSetupSpillInputMethod · 0.80
addSpillInputMethod · 0.80
setupSpillerMethod · 0.80
TEST_PFunction · 0.80

Calls 5

createFunction · 0.50
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
clearMethod · 0.45

Tested by 3

TEST_PFunction · 0.64