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::CollectionCheckpointState Struct Reference
Collaboration diagram for duckdb::CollectionCheckpointState:

Public Member Functions

 CollectionCheckpointState (RowGroupCollection &collection, TableDataWriter &writer, TableStatistics &global_stats, RowGroupSegmentTree &row_groups)
idx_t SegmentCount () const
optional_ptr< SegmentNode< RowGroup > > GetSegment (idx_t index)
void DropSegment (idx_t index)
bool SegmentIsDropped (idx_t index) const
void SetSegment (idx_t row_start, idx_t index, shared_ptr< RowGroup > row_group)

Public Attributes

RowGroupCollection & collection
TableDataWriter & writer
unique_ptr< TaskExecutor > executor
vector< unique_ptr< RowGroupWriter > > writers
vector< RowGroupWriteData > write_data
TableStatistics & global_stats
RowGroupSegmentTree & row_groups

Private Attributes

vector< unique_ptr< SegmentNode< RowGroup > > > overridden_segments
unique_array< bool > dropped_segments

Constructor & Destructor Documentation

◆ CollectionCheckpointState()

duckdb::CollectionCheckpointState::CollectionCheckpointState ( RowGroupCollection & collection,
TableDataWriter & writer,
TableStatistics & global_stats,
RowGroupSegmentTree & row_groups )
inline
435555 : collection(collection), writer(writer), executor(writer.CreateTaskExecutor()), global_stats(global_stats),
435556 row_groups(row_groups) {
435557 auto segment_count = row_groups.GetSegmentCount();
435558 writers.resize(segment_count);
435559 write_data.resize(segment_count);
435560 dropped_segments = make_uniq_array<bool>(segment_count);
435561 overridden_segments.resize(segment_count);
435562 }

Member Function Documentation

◆ SegmentCount()

idx_t duckdb::CollectionCheckpointState::SegmentCount ( ) const
inline
435572 {
435573 return writers.size();
435574 }

◆ GetSegment()

optional_ptr< SegmentNode< RowGroup > > duckdb::CollectionCheckpointState::GetSegment ( idx_t index)
inline
435575 {
435576 if (overridden_segments[index]) {
435577 return *overridden_segments[index];
435578 }
435579 if (dropped_segments[index]) {
435580 // segment was dropped
435581 return nullptr;
435582 }
435583 return row_groups.GetSegmentByIndex(NumericCast<int64_t>(index));
435584 }
index

◆ DropSegment()

void duckdb::CollectionCheckpointState::DropSegment ( idx_t index)
inline
435586 {
435587 dropped_segments[index] = true;
435588 }

◆ SegmentIsDropped()

bool duckdb::CollectionCheckpointState::SegmentIsDropped ( idx_t index) const
inline
435590 {
435591 return !overridden_segments[index] && dropped_segments[index];
435592 }

◆ SetSegment()

void duckdb::CollectionCheckpointState::SetSegment ( idx_t row_start,
idx_t index,
shared_ptr< RowGroup > row_group )
inline
435594 {
435595 overridden_segments[index] = make_uniq<SegmentNode<RowGroup>>(row_start, std::move(row_group), index);
435596 }

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