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::RowGroupSegmentTree Class Reference
Inheritance diagram for duckdb::RowGroupSegmentTree:
Collaboration diagram for duckdb::RowGroupSegmentTree:

Public Member Functions

 RowGroupSegmentTree (RowGroupCollection &collection, idx_t base_row_id)
void Initialize (PersistentTableData &data, optional_ptr< vector< MetaBlockPointer > > read_pointers=nullptr)
MetaBlockPointer GetRootPointer () const
Public Member Functions inherited from duckdb::SegmentTree< RowGroup, true >
 SegmentTree (idx_t base_row_id=0)
SegmentLock Lock () const
bool IsEmpty (SegmentLock &l) const
optional_ptr< SegmentNode< RowGroup > > GetRootSegment () const
 Gets a pointer to the first segment. Useful for scans.
vector< unique_ptr< SegmentNode< RowGroup > > > MoveSegments (SegmentLock &l)
 Obtains ownership of the data of the segment tree.
vector< unique_ptr< SegmentNode< RowGroup > > > & ReferenceLoadedSegmentsMutable (SegmentLock &l)
idx_t GetSegmentCount () const
optional_ptr< SegmentNode< RowGroup > > GetSegmentByIndex (int64_t index) const
 Gets a pointer to the nth segment. Negative numbers start from the back.
optional_ptr< SegmentNode< RowGroup > > GetNextSegment (SegmentNode< RowGroup > &node) const
 Gets the next segment.
optional_ptr< SegmentNode< RowGroup > > GetLastSegment (SegmentLock &l) const
 Gets a pointer to the last segment. Useful for appends.
optional_ptr< SegmentNode< RowGroup > > GetSegment (idx_t row_number) const
 Gets a pointer to a specific column segment for the given row.
void AppendSegment (shared_ptr< RowGroup > segment)
bool HasSegment (SegmentNode< RowGroup > &segment) const
 Debug method, check whether the segment is in the segment tree.
void EraseSegments (SegmentLock &l, idx_t segment_start)
 Erase all segments after a specific segment.
idx_t GetSegmentIndex (SegmentLock &l, idx_t row_number) const
 Get the segment index of the column segment for the given row.
bool TryGetSegmentIndex (SegmentLock &l, idx_t row_number, idx_t &result) const
void Verify (SegmentLock &) const
idx_t GetBaseRowId () const
SegmentIterationHelper Segments () const
SegmentNodeIterationHelper SegmentNodes () const

Protected Member Functions

shared_ptr< RowGroup > LoadSegment () const override
 Load the next segment - only used when lazily loading.
Protected Member Functions inherited from duckdb::SegmentTree< RowGroup, true >
optional_ptr< SegmentNode< RowGroup > > GetRootSegmentInternal () const

Protected Attributes

RowGroupCollection & collection
idx_t current_row_group
idx_t max_row_group
unique_ptr< MetadataReader > reader
MetaBlockPointer root_pointer
Protected Attributes inherited from duckdb::SegmentTree< RowGroup, true >
atomic< bool > finished_loading

Constructor & Destructor Documentation

◆ RowGroupSegmentTree()

duckdb::RowGroupSegmentTree::RowGroupSegmentTree ( RowGroupCollection & collection,
idx_t base_row_id )
434510 : SegmentTree<RowGroup, true>(base_row_id), collection(collection), current_row_group(0), max_row_group(0) {
434511}
idx_t base_row_id
Definition duckdb.hpp:23841

◆ ~RowGroupSegmentTree()

duckdb::RowGroupSegmentTree::~RowGroupSegmentTree ( )
override
434512 {
434513}

Member Function Documentation

◆ Initialize()

void duckdb::RowGroupSegmentTree::Initialize ( PersistentTableData & data,
optional_ptr< vector< MetaBlockPointer > > read_pointers = nullptr )
434515 {
434516 D_ASSERT(data.row_group_count > 0);
434517 current_row_group = 0;
434518 max_row_group = data.row_group_count;
434519 finished_loading = false;
434520 reader = make_uniq<MetadataReader>(collection.GetMetadataManager(), data.block_pointer, read_pointers);
434521 root_pointer = data.block_pointer;
434522}

◆ GetRootPointer()

MetaBlockPointer duckdb::RowGroupSegmentTree::GetRootPointer ( ) const
inline
23998 {
23999 return root_pointer;
24000 }

◆ LoadSegment()

shared_ptr< RowGroup > duckdb::RowGroupSegmentTree::LoadSegment ( ) const
overrideprotectedvirtual

Load the next segment - only used when lazily loading.

Reimplemented from duckdb::SegmentTree< RowGroup, true >.

434524 {
434525 if (current_row_group >= max_row_group) {
434526 reader.reset();
434527 finished_loading = true;
434528 return nullptr;
434529 }
434530 BinaryDeserializer deserializer(*reader);
434531 deserializer.Begin();
434532 auto row_group_pointer = RowGroup::Deserialize(deserializer);
434533 deserializer.End();
434534 current_row_group++;
434535 return make_shared_ptr<RowGroup>(collection, std::move(row_group_pointer));
434536}

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