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

Public Member Functions

 RowGroup (RowGroupCollection &collection, idx_t count)
 
 RowGroup (RowGroupCollection &collection, RowGroupPointer pointer)
 
 RowGroup (RowGroupCollection &collection, PersistentRowGroupData &data)
 
void MoveToCollection (RowGroupCollection &collection)
 
RowGroupCollectionGetCollection () const
 
vector< idx_tGetOrComputeExtraMetadataBlocks (bool force_compute=false)
 Returns the list of meta block pointers used by the columns.
 
const vector< MetaBlockPointer > & GetColumnStartPointers () const
 
BlockManagerGetBlockManager () const
 
DataTableInfoGetTableInfo () const
 
unique_ptr< RowGroupAlterType (RowGroupCollection &collection, const LogicalType &target_type, idx_t changed_idx, ExpressionExecutor &executor, CollectionScanState &scan_state, SegmentNode< RowGroup > &node, DataChunk &scan_chunk)
 
unique_ptr< RowGroupAddColumn (RowGroupCollection &collection, ColumnDefinition &new_column, ExpressionExecutor &executor, Vector &intermediate)
 
unique_ptr< RowGroupRemoveColumn (RowGroupCollection &collection, idx_t removed_column)
 
void CommitDrop ()
 
void CommitDropColumn (const idx_t column_index)
 
void InitializeEmpty (const vector< LogicalType > &types, ColumnDataType data_type)
 
bool HasChanges () const
 
bool InitializeScan (CollectionScanState &state, SegmentNode< RowGroup > &node)
 Initialize a scan over this row_group.
 
bool InitializeScanWithOffset (CollectionScanState &state, SegmentNode< RowGroup > &node, idx_t vector_offset)
 
bool CheckZonemap (ScanFilterInfo &filters)
 
bool CheckZonemapSegments (CollectionScanState &state)
 
void Scan (ScanOptions options, CollectionScanState &state, DataChunk &result)
 
void Scan (CollectionScanState &state, DataChunk &result, TableScanType type)
 
idx_t GetSelVector (ScanOptions options, idx_t vector_idx, SelectionVector &sel_vector, idx_t max_count)
 
bool Fetch (TransactionData transaction, idx_t row)
 For a specific row, returns true if it should be used for the transaction and false otherwise.
 
void FetchRow (TransactionData transaction, ColumnFetchState &state, const vector< StorageIndex > &column_ids, row_t row_id, DataChunk &result, idx_t result_idx)
 Fetch a specific row from the row_group and insert it into the result at the specified index.
 
void AppendVersionInfo (TransactionData transaction, idx_t count)
 Append count rows to the version info.
 
void CommitAppend (transaction_t commit_id, idx_t start, idx_t count)
 Commit a previous append made by RowGroup::AppendVersionInfo.
 
void RevertAppend (idx_t new_count)
 Revert a previous append made by RowGroup::AppendVersionInfo.
 
void CleanupAppend (transaction_t lowest_transaction, idx_t start, idx_t count)
 Clean up append states that can either be compressed or deleted.
 
idx_t Delete (TransactionData transaction, DataTable &table, row_t *row_ids, idx_t count, idx_t row_group_start)
 Delete the given set of rows in the version manager.
 
RowGroupWriteData WriteToDisk (RowGroupWriteInfo &info) const
 
idx_t GetCommittedRowCount ()
 Returns the number of committed rows (count - committed deletes)
 
RowGroupWriteData WriteToDisk (RowGroupWriter &writer)
 
RowGroupPointer Checkpoint (RowGroupWriteData write_data, RowGroupWriter &writer, TableStatistics &global_stats, idx_t row_group_start)
 
bool IsPersistent () const
 
PersistentRowGroupData SerializeRowGroupInfo (idx_t row_group_start) const
 
void InitializeAppend (RowGroupAppendState &append_state)
 
void Append (RowGroupAppendState &append_state, DataChunk &chunk, idx_t append_count)
 
void Update (TransactionData transaction, DataTable &data_table, DataChunk &updates, row_t *ids, idx_t offset, idx_t count, const vector< PhysicalIndex > &column_ids, idx_t row_group_start)
 
void UpdateColumn (TransactionData transaction, DataTable &data_table, DataChunk &updates, Vector &row_ids, idx_t offset, idx_t count, const vector< column_t > &column_path, idx_t row_group_start)
 
void MergeStatistics (idx_t column_idx, const BaseStatistics &other)
 
void MergeIntoStatistics (idx_t column_idx, BaseStatistics &other)
 
void MergeIntoStatistics (TableStatistics &other)
 
unique_ptr< BaseStatisticsGetStatistics (idx_t column_idx) const
 
unique_ptr< BaseStatisticsGetStatistics (const StorageIndex &column_idx) const
 
void GetColumnSegmentInfo (const QueryContext &context, idx_t row_group_index, vector< ColumnSegmentInfo > &result)
 
idx_t GetAllocationSize () const
 
void Verify ()
 
void NextVector (CollectionScanState &state)
 
idx_t DeleteRows (idx_t vector_idx, transaction_t transaction_id, row_t rows[], idx_t count)
 
RowVersionManagerGetOrCreateVersionInfo ()
 
idx_t GetRowGroupSize () const
 
idx_t GetColumnCount () const
 
vector< MetaBlockPointerCheckpointDeletes (RowGroupWriter &writer)
 
- Public Member Functions inherited from duckdb::SegmentBase< RowGroup >
 SegmentBase (idx_t count)
 

Static Public Member Functions

static vector< RowGroupWriteDataWriteToDisk (RowGroupWriteInfo &info, const vector< const_reference< RowGroup > > &row_groups)
 
static PartitionStatistics GetPartitionStats (SegmentNode< RowGroup > &row_group)
 
static void Serialize (RowGroupPointer &pointer, Serializer &serializer)
 
static RowGroupPointer Deserialize (Deserializer &deserializer)
 
static FilterPropagateResult CheckRowIdFilter (const TableFilter &filter, idx_t beg_row, idx_t end_row)
 

Private Member Functions

optional_ptr< RowVersionManagerGetVersionInfo ()
 
optional_ptr< RowVersionManagerGetVersionInfoIfLoaded () const
 
shared_ptr< RowVersionManagerGetOrCreateVersionInfoPtr ()
 
shared_ptr< RowVersionManagerGetOrCreateVersionInfoInternal ()
 
void SetVersionInfo (shared_ptr< RowVersionManager > version)
 
ColumnDataGetColumn (storage_t c) const
 
void LoadColumn (storage_t c) const
 
ColumnDataGetColumn (const StorageIndex &c) const
 
vector< shared_ptr< ColumnData > > & GetColumns ()
 
void LoadRowIdColumnData () const
 
void SetCount (idx_t count)
 
bool HasUnloadedDeletes () const
 

Private Attributes

reference< RowGroupCollectioncollection
 The RowGroupCollection this row-group is a part of.
 
atomic< optional_ptr< RowVersionManager > > version_info
 The version info of the row_group (inserted and deleted tuple info)
 
shared_ptr< RowVersionManagerowned_version_info
 The owned version info of the row_group (inserted and deleted tuple info)
 
vector< shared_ptr< ColumnData > > columns
 The column data of the row_group (mutable because const can lazily load)
 
mutex row_group_lock
 
vector< MetaBlockPointercolumn_pointers
 
unique_ptr< atomic< bool >[]> is_loaded
 Whether or not each column is loaded (mutable because const can lazy load)
 
vector< MetaBlockPointerdeletes_pointers
 
bool has_metadata_blocks = false
 
vector< idx_textra_metadata_blocks
 
atomic< bool > deletes_is_loaded
 
atomic< idx_tallocation_size
 
unique_ptr< ColumnDatarow_id_column_data
 The row id column data (mutable because const can lazy load)
 
atomic< bool > row_id_is_loaded
 Whether or not row_id_column_data is loaded (mutable because const can lazy load)
 
atomic< bool > has_changes
 

Friends

class ColumnData
 

Additional Inherited Members

- Public Attributes inherited from duckdb::SegmentBase< RowGroup >
atomic< idx_tcount
 The amount of entries in this storage chunk.
 

Member Function Documentation

◆ GetCollection()

RowGroupCollection & duckdb::RowGroup::GetCollection ( ) const
inline
23250 {
23251 return collection.get();
23252 }
reference< RowGroupCollection > collection
The RowGroupCollection this row-group is a part of.
Definition duckdb.hpp:23240

◆ CheckZonemap()

bool duckdb::RowGroup::CheckZonemap ( ScanFilterInfo filters)

Checks the given set of table filters against the row-group statistics. Returns false if the entire row group can be skipped.

◆ CheckZonemapSegments()

bool duckdb::RowGroup::CheckZonemapSegments ( CollectionScanState state)

Checks the given set of table filters against the per-segment statistics. Returns false if any segments were skipped.

◆ WriteToDisk()

RowGroupWriteData duckdb::RowGroup::WriteToDisk ( RowGroupWriteInfo info) const

Write the data inside this RowGroup to disk and return a struct with information about the write Including the new RowGroup that contains the columns in their written-to-disk form

◆ UpdateColumn()

void duckdb::RowGroup::UpdateColumn ( TransactionData  transaction,
DataTable data_table,
DataChunk updates,
Vector row_ids,
idx_t  offset,
idx_t  count,
const vector< column_t > &  column_path,
idx_t  row_group_start 
)

Update a single column; corresponds to DataTable::UpdateColumn This method should only be called from the WAL

◆ GetAllocationSize()

idx_t duckdb::RowGroup::GetAllocationSize ( ) const
inline
23338 {
23339 return allocation_size;
23340 }

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