Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::OptimisticWriteCollection Struct Reference
Collaboration diagram for duckdb::OptimisticWriteCollection:

Public Member Functions

void MergeStorage (OptimisticWriteCollection &collection)

Public Attributes

shared_ptr< RowGroupCollection > collection
set< idx_t > unflushed_row_groups
idx_t complete_row_groups = 0
vector< unique_ptr< PartialBlockManager > > partial_block_managers

Constructor & Destructor Documentation

◆ ~OptimisticWriteCollection()

duckdb::OptimisticWriteCollection::~OptimisticWriteCollection ( )
415032 {
415033}

Member Function Documentation

◆ MergeStorage()

void duckdb::OptimisticWriteCollection::MergeStorage ( OptimisticWriteCollection & collection)
415143 {
415144 auto &merge_row_groups = *merge_collection.collection;
415145 if (merge_row_groups.GetTotalRows() == 0) {
415146 // no rows to merge - done
415147 return;
415148 }
415149 // when merging the other row group is appended to the END of this row group
415150 // that means any trailing row groups that are not yet complete are now complete (even if they are half empty)
415151 // add them to the unflushed set
415152 idx_t current_row_group_count = collection->GetRowGroupCount();
415153 if (complete_row_groups > current_row_group_count) {
415154 throw InternalException("MergeStorage - complete row groups > total_row_groups");
415155 }
415156 for (idx_t i = complete_row_groups; i < current_row_group_count; i++) {
415157 unflushed_row_groups.insert(i);
415158 complete_row_groups++;
415159 }
415160
415161 // now we merge the target collection into this one - take over any unflushed row groups but adjust their index
415162 for (auto &unflushed_idx : merge_collection.unflushed_row_groups) {
415163 unflushed_row_groups.insert(current_row_group_count + unflushed_idx);
415164 }
415165 complete_row_groups += merge_collection.complete_row_groups;
415166 // finally perform the actual merge
415167 collection->MergeStorage(merge_row_groups, nullptr, nullptr);
415168 // check if all row groups have been flushed
415169 // we cannot append into a row group that has been flushed
415170 if (complete_row_groups == collection->GetRowGroupCount()) {
415171 // if the last row group has been flushed move any new appends to a new row group
415172 collection->SetAppendRequiresNewRowGroup();
415173 }
415174}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

The documentation for this struct was generated from the following files: