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

Method hasNextPartition

bolt/exec/SortWindowBuild.cpp:510–526  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508 }
509
510 return partitionStartRows_.size() > 0 &&
511 currentPartition_ < int(partitionStartRows_.size() - 2);
512}
513
514void SortWindowBuild::initializeNewPartitions() {
515 for (auto index : lookup_->newGroups) {
516 new (lookup_->hits[index] + partitionOffset_)
517 TopRows(table_->stringAllocator(), comparator_);
518 }
519}
520
521void SortWindowBuild::clearTopRows() {
522 if (!table_) {
523 return;
524 }
525
526 BaseHashTable::RowsIterator partitionIt;
527 static const size_t kPartitionBatchSize = 1000;
528 std::vector<char*> partitions{kPartitionBatchSize};
529 while (auto numPartitions = table_->listAllRows(

Callers 1

callResetPartitionMethod · 0.45

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected