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

Public Member Functions

 RowGroupCollection (shared_ptr< DataTableInfo > info, TableIOManager &io_manager, vector< LogicalType > types, idx_t row_start, idx_t total_rows=0)
 
 RowGroupCollection (shared_ptr< DataTableInfo > info, BlockManager &block_manager, vector< LogicalType > types, idx_t row_start, idx_t total_rows, idx_t row_group_size)
 
idx_t GetTotalRows () const
 
idx_t GetRowGroupCount () const
 
AllocatorGetAllocator () const
 
void Initialize (PersistentCollectionData &data)
 
void Initialize (PersistentTableData &data)
 
void InitializeEmpty ()
 
void FinalizeCheckpoint (MetaBlockPointer pointer, const vector< MetaBlockPointer > &existing_pointers)
 
bool IsEmpty () const
 
void AppendRowGroup (SegmentLock &l, idx_t start_row)
 
optional_ptr< RowGroupGetRowGroup (int64_t index)
 Get the nth row-group, negative numbers start from the back (so -1 is the last row group, etc)
 
void SetRowGroup (int64_t index, shared_ptr< RowGroup > new_row_group)
 Overrides a row group - should only be used if you know what you're doing (will likely be removed in the future)
 
void Verify ()
 
void Destroy ()
 
void InitializeScan (const QueryContext &context, CollectionScanState &state, const vector< StorageIndex > &column_ids, optional_ptr< TableFilterSet > table_filters)
 
void InitializeCreateIndexScan (CreateIndexScanState &state)
 
void InitializeScanWithOffset (const QueryContext &context, CollectionScanState &state, const vector< StorageIndex > &column_ids, idx_t start_row, idx_t end_row)
 
void InitializeParallelScan (ParallelCollectionScanState &state)
 
bool NextParallelScan (ClientContext &context, ParallelCollectionScanState &state, CollectionScanState &scan_state)
 
RowGroupIterationHelper Chunks (DuckTransaction &transaction)
 
RowGroupIterationHelper Chunks (DuckTransaction &transaction, const vector< StorageIndex > &column_ids)
 
void Fetch (TransactionData transaction, DataChunk &result, const vector< StorageIndex > &column_ids, const Vector &row_identifiers, idx_t fetch_count, ColumnFetchState &state)
 
bool CanFetch (TransactionData, const row_t row_id)
 Returns true, if the row group can fetch the row id for the transaction.
 
void InitializeAppend (TableAppendState &state)
 Initialize an append of a variable number of rows. FinalizeAppend must be called after appending is done.
 
void InitializeAppend (TransactionData transaction, TableAppendState &state)
 
bool Append (DataChunk &chunk, TableAppendState &state)
 Appends to the row group collection. Returns true if a new row group has been created to append to.
 
void FinalizeAppend (TransactionData transaction, TableAppendState &state)
 FinalizeAppend flushes an append with a variable number of rows.
 
void CommitAppend (transaction_t commit_id, idx_t row_start, idx_t count)
 
void RevertAppendInternal (idx_t start_row)
 
void CleanupAppend (transaction_t lowest_transaction, idx_t start, idx_t count)
 
void MergeStorage (RowGroupCollection &data, optional_ptr< DataTable > table, optional_ptr< StorageCommitState > commit_state)
 
bool IsPersistent () const
 
void RemoveFromIndexes (const QueryContext &context, TableIndexList &indexes, Vector &row_identifiers, idx_t count, IndexRemovalType removal_type, optional_idx active_checkpoint=optional_idx())
 
idx_t Delete (TransactionData transaction, DataTable &table, row_t *ids, idx_t count)
 
void Update (TransactionData transaction, DataTable &table, row_t *ids, const vector< PhysicalIndex > &column_ids, DataChunk &updates)
 
void UpdateColumn (TransactionData transaction, DataTable &table, Vector &row_ids, const vector< column_t > &column_path, DataChunk &updates)
 
void Checkpoint (TableDataWriter &writer, TableStatistics &global_stats)
 
void InitializeVacuumState (CollectionCheckpointState &checkpoint_state, VacuumState &state, optional_idx checkpoint_row_group_count)
 
bool ScheduleVacuumTasks (CollectionCheckpointState &checkpoint_state, VacuumState &state, idx_t segment_idx, bool schedule_vacuum)
 
unique_ptr< CheckpointTaskGetCheckpointTask (CollectionCheckpointState &checkpoint_state, idx_t segment_idx)
 
void CommitDropColumn (const idx_t column_index)
 
void CommitDropTable ()
 
vector< PartitionStatisticsGetPartitionStats () const
 
vector< ColumnSegmentInfoGetColumnSegmentInfo (const QueryContext &context)
 
const vector< LogicalType > & GetTypes () const
 
shared_ptr< RowGroupCollectionAddColumn (ClientContext &context, ColumnDefinition &new_column, ExpressionExecutor &default_executor)
 
shared_ptr< RowGroupCollectionRemoveColumn (idx_t col_idx)
 
shared_ptr< RowGroupCollectionAlterType (ClientContext &context, idx_t changed_idx, const LogicalType &target_type, vector< StorageIndex > bound_columns, Expression &cast_expr)
 
void VerifyNewConstraint (const QueryContext &context, DataTable &parent, const BoundConstraint &constraint)
 
void SetStats (TableStatistics &new_stats)
 
void CopyStats (TableStatistics &stats)
 
unique_ptr< BaseStatisticsCopyStats (const StorageIndex &column_id)
 
unique_ptr< BlockingSampleGetSample ()
 
void SetDistinct (column_t column_id, unique_ptr< DistinctStatistics > distinct_stats)
 
AttachedDatabaseGetAttached ()
 
BlockManagerGetBlockManager ()
 
MetadataManagerGetMetadataManager ()
 
DataTableInfoGetTableInfo ()
 
idx_t GetAllocationSize () const
 
idx_t GetRowGroupSize () const
 
void SetAppendRequiresNewRowGroup ()
 
idx_t GetSegmentCount ()
 Returns the total amount of segments - use sparingly, as this forces all segments to be loaded.
 

Static Public Member Functions

static bool InitializeScanInRowGroup (ClientContext &context, CollectionScanState &state, RowGroupCollection &collection, SegmentNode< RowGroup > &row_group, idx_t vector_index, idx_t max_row)
 

Private Member Functions

optional_ptr< SegmentNode< RowGroup > > NextUpdateRowGroup (RowGroupSegmentTree &row_groups, row_t *ids, idx_t &pos, idx_t count) const
 
shared_ptr< RowGroupSegmentTreeGetRowGroups () const
 
void SetRowGroups (shared_ptr< RowGroupSegmentTree > row_groups)
 

Private Attributes

BlockManagerblock_manager
 BlockManager.
 
const idx_t row_group_size
 The row group size of the row group collection.
 
atomic< idx_ttotal_rows
 The number of rows in the table.
 
shared_ptr< DataTableInfoinfo
 The data table info.
 
vector< LogicalTypetypes
 The column types of the row group collection.
 
mutex row_group_pointer_lock
 Lock held when accessing or modifying the owned_row_groups pointer.
 
shared_ptr< RowGroupSegmentTreeowned_row_groups
 The owning pointer of the segment tree.
 
TableStatistics stats
 Table statistics.
 
atomic< idx_tallocation_size
 Allocation size, only tracked for appends.
 
MetaBlockPointer metadata_pointer
 Root metadata pointer, if the collection is loaded from disk.
 
vector< MetaBlockPointermetadata_pointers
 Other metadata pointers.
 
bool requires_new_row_group
 Whether or not we need to append a new row group prior to appending.
 

Member Function Documentation

◆ InitializeAppend()

void duckdb::RowGroupCollection::InitializeAppend ( TransactionData  transaction,
TableAppendState state 
)

Initialize an append with a variable number of rows. FinalizeAppend should not be called after appending is done.

◆ GetBlockManager()

BlockManager & duckdb::RowGroupCollection::GetBlockManager ( )
inline
50588 {
50589 return block_manager;
50590 }
BlockManager & block_manager
BlockManager.
Definition duckdb.hpp:50616

◆ GetTableInfo()

DataTableInfo & duckdb::RowGroupCollection::GetTableInfo ( )
inline
50592 {
50593 return *info;
50594 }
shared_ptr< DataTableInfo > info
The data table info.
Definition duckdb.hpp:50622

◆ GetAllocationSize()

idx_t duckdb::RowGroupCollection::GetAllocationSize ( ) const
inline
50596 {
50597 return allocation_size;
50598 }
atomic< idx_t > allocation_size
Allocation size, only tracked for appends.
Definition duckdb.hpp:50632

◆ GetRowGroupSize()

idx_t duckdb::RowGroupCollection::GetRowGroupSize ( ) const
inline
50600 {
50601 return row_group_size;
50602 }
const idx_t row_group_size
The row group size of the row group collection.
Definition duckdb.hpp:50618

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