![]() |
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.
|
#include <duckdb.hpp>

Public Member Functions | |
| DUCKDB_API | ColumnDataCollection (Allocator &allocator, vector< LogicalType > types) |
| Constructs an in-memory column data collection from an allocator. | |
| DUCKDB_API | ColumnDataCollection (Allocator &allocator) |
| Constructs an empty (but valid) in-memory column data collection from an allocator. | |
| DUCKDB_API | ColumnDataCollection (BufferManager &buffer_manager, vector< LogicalType > types, ColumnDataCollectionLifetime lifetime=ColumnDataCollectionLifetime::REGULAR) |
| Constructs a buffer-managed column data collection. | |
| DUCKDB_API | ColumnDataCollection (ClientContext &context, vector< LogicalType > types, ColumnDataAllocatorType type=ColumnDataAllocatorType::BUFFER_MANAGER_ALLOCATOR, ColumnDataCollectionLifetime lifetime=ColumnDataCollectionLifetime::REGULAR) |
| Constructs either an in-memory or a buffer-managed column data collection. | |
| DUCKDB_API | ColumnDataCollection (ColumnDataCollection &parent) |
| DUCKDB_API | ColumnDataCollection (shared_ptr< ColumnDataAllocator > allocator, vector< LogicalType > types) |
| vector< LogicalType > & | Types () |
| The types of columns in the ColumnDataCollection. | |
| const vector< LogicalType > & | Types () const |
| const idx_t & | Count () const |
| The amount of rows in the ColumnDataCollection. | |
| idx_t | ColumnCount () const |
| The amount of columns in the ColumnDataCollection. | |
| idx_t | SizeInBytes () const |
| The size (in bytes) of this ColumnDataCollection. | |
| idx_t | AllocationSize () const |
| The allocation size (in bytes) of this ColumnDataCollection - this property is cached. | |
| void | SetPartitionIndex (idx_t index) |
| Sets the partition index of this ColumnDataCollection. | |
| DUCKDB_API Allocator & | GetAllocator () const |
| Get the allocator. | |
| DUCKDB_API void | InitializeAppend (ColumnDataAppendState &state) |
| Initializes an Append state - useful for optimizing many appends made to the same column data collection. | |
| DUCKDB_API void | Append (ColumnDataAppendState &state, DataChunk &new_chunk) |
| Append a DataChunk to this ColumnDataCollection using the specified append state. | |
| DUCKDB_API void | InitializeScanChunk (DataChunk &chunk) const |
| Initializes a chunk with the correct types that can be used to call Scan. | |
| DUCKDB_API void | InitializeScanChunk (Allocator &allocator, DataChunk &chunk) const |
| DUCKDB_API void | InitializeScanChunk (ColumnDataScanState &state, DataChunk &chunk) const |
| Initializes a chunk with the correct types for a given scan state. | |
| DUCKDB_API void | InitializeScan (ColumnDataScanState &state, ColumnDataScanProperties properties=ColumnDataScanProperties::ALLOW_ZERO_COPY) const |
| Initializes a Scan state for scanning all columns. | |
| DUCKDB_API void | InitializeScan (ColumnDataScanState &state, vector< column_t > column_ids, ColumnDataScanProperties properties=ColumnDataScanProperties::ALLOW_ZERO_COPY) const |
| Initializes a Scan state for scanning a subset of the columns. | |
| DUCKDB_API void | InitializeScan (ColumnDataParallelScanState &state, ColumnDataScanProperties properties=ColumnDataScanProperties::ALLOW_ZERO_COPY) const |
| Initialize a parallel scan over the column data collection over all columns. | |
| DUCKDB_API void | InitializeScan (ColumnDataParallelScanState &state, vector< column_t > column_ids, ColumnDataScanProperties properties=ColumnDataScanProperties::ALLOW_ZERO_COPY) const |
| Initialize a parallel scan over the column data collection over a subset of the columns. | |
| DUCKDB_API bool | Scan (ColumnDataScanState &state, DataChunk &result) const |
| Scans a DataChunk from the ColumnDataCollection. | |
| DUCKDB_API bool | Scan (ColumnDataParallelScanState &state, ColumnDataLocalScanState &lstate, DataChunk &result) const |
| Scans a DataChunk from the ColumnDataCollection. | |
| DUCKDB_API void | Append (DataChunk &new_chunk) |
| Append a DataChunk directly to this ColumnDataCollection - calls InitializeAppend and Append internally. | |
| DUCKDB_API void | Combine (ColumnDataCollection &other) |
| Appends the other ColumnDataCollection to this, destroying the other data collection. | |
| DUCKDB_API void | Verify () |
| DUCKDB_API string | ToString () const |
| DUCKDB_API void | Print () const |
| DUCKDB_API void | Reset () |
| DUCKDB_API idx_t | ChunkCount () const |
| Returns the number of data chunks present in the ColumnDataCollection. | |
| DUCKDB_API void | FetchChunk (idx_t chunk_idx, DataChunk &result) const |
| Fetch an individual chunk from the ColumnDataCollection. | |
| DUCKDB_API ColumnDataChunkIterationHelper | Chunks () const |
| DUCKDB_API ColumnDataChunkIterationHelper | Chunks (vector< column_t > column_ids) const |
| DUCKDB_API ColumnDataRowIterationHelper | Rows () const |
| DUCKDB_API ColumnDataRowCollection | GetRows () const |
| bool | NextScanIndex (ColumnDataScanState &state, idx_t &chunk_index, idx_t &segment_index, idx_t &row_index) const |
| Obtains the next scan index to scan from. | |
| bool | PrevScanIndex (ColumnDataScanState &state, idx_t &chunk_index, idx_t &segment_index, idx_t &row_index) const |
| Obtains the previous scan index to scan from. | |
| void | ScanAtIndex (ColumnDataParallelScanState &state, ColumnDataLocalScanState &lstate, DataChunk &result, idx_t chunk_index, idx_t segment_index, idx_t row_index) const |
| Scans at the indices (obtained from NextScanIndex). | |
| bool | Seek (idx_t row_idx, ColumnDataScanState &state, DataChunk &result) const |
| void | Initialize (vector< LogicalType > types) |
| Initialize the column data collection. | |
| vector< shared_ptr< StringHeap > > | GetHeapReferences () |
| Get references to the string heaps in this ColumnDataCollection. | |
| ColumnDataAllocatorType | GetAllocatorType () const |
| Get the allocator type of this ColumnDataCollection. | |
| BufferManager & | GetBufferManager () const |
| Get the buffer manager of the allocator. | |
| const vector< unique_ptr< ColumnDataCollectionSegment > > & | GetSegments () const |
| Get a vector of the segments in this ColumnDataCollection. | |
| void | Serialize (Serializer &serializer) const |
Static Public Member Functions | |
| static bool | ResultEquals (const ColumnDataCollection &left, const ColumnDataCollection &right, string &error_message, bool ordered=false) |
| static unique_ptr< ColumnDataCollection > | Deserialize (Deserializer &deserializer) |
Private Member Functions | |
| void | CreateSegment () |
| Creates a new segment within the ColumnDataCollection. | |
Static Private Member Functions | |
| static ColumnDataCopyFunction | GetCopyFunction (const LogicalType &type) |
Private Attributes | |
| buffer_ptr< ColumnDataAllocator > | allocator |
| The Column Data Allocator. | |
| vector< LogicalType > | types |
| The types of the stored entries. | |
| idx_t | count |
| The number of entries stored in the column data collection. | |
| vector< unique_ptr< ColumnDataCollectionSegment > > | segments |
| The data segments of the column data collection. | |
| vector< ColumnDataCopyFunction > | copy_functions |
| The set of copy functions. | |
| bool | finished_append |
| When the column data collection is marked as finished - new tuples can no longer be appended to it. | |
| optional_idx | partition_index |
| Partition index (optional, if partitioned). | |
The ColumnDataCollection represents a set of (buffer-managed) data stored in columnar format It is efficient to read and scan
| duckdb::ColumnDataCollection::ColumnDataCollection | ( | Allocator & | allocator, |
| vector< LogicalType > | types ) |
Constructs an in-memory column data collection from an allocator.


|
explicit |
Constructs an empty (but valid) in-memory column data collection from an allocator.
Explicitly initialized without types.
| duckdb::ColumnDataCollection::ColumnDataCollection | ( | BufferManager & | buffer_manager, |
| vector< LogicalType > | types, | ||
| ColumnDataCollectionLifetime | lifetime = ColumnDataCollectionLifetime::REGULAR ) |
Constructs a buffer-managed column data collection.

| duckdb::ColumnDataCollection::ColumnDataCollection | ( | ClientContext & | context, |
| vector< LogicalType > | types, | ||
| ColumnDataAllocatorType | type = ColumnDataAllocatorType::BUFFER_MANAGER_ALLOCATOR, | ||
| ColumnDataCollectionLifetime | lifetime = ColumnDataCollectionLifetime::REGULAR ) |
Constructs either an in-memory or a buffer-managed column data collection.

| duckdb::ColumnDataCollection::ColumnDataCollection | ( | ColumnDataCollection & | parent | ) |
Creates a column data collection that inherits the blocks to write to. This allows blocks to be shared between multiple column data collections and prevents wasting space. Note that after one CDC inherits blocks from another, the other cannot be written to anymore (i.e. we take ownership of the half-written blocks).

| duckdb::ColumnDataCollection::ColumnDataCollection | ( | shared_ptr< ColumnDataAllocator > | allocator, |
| vector< LogicalType > | types ) |
| duckdb::ColumnDataCollection::~ColumnDataCollection | ( | ) |
|
inline |
The types of columns in the ColumnDataCollection.
|
inline |
|
inline |
|
inline |
| idx_t duckdb::ColumnDataCollection::SizeInBytes | ( | ) | const |
The size (in bytes) of this ColumnDataCollection.
| idx_t duckdb::ColumnDataCollection::AllocationSize | ( | ) | const |
The allocation size (in bytes) of this ColumnDataCollection - this property is cached.
| void duckdb::ColumnDataCollection::SetPartitionIndex | ( | idx_t | index | ) |
Sets the partition index of this ColumnDataCollection.

| Allocator & duckdb::ColumnDataCollection::GetAllocator | ( | ) | const |
Get the allocator.
| void duckdb::ColumnDataCollection::InitializeAppend | ( | ColumnDataAppendState & | state | ) |
Initializes an Append state - useful for optimizing many appends made to the same column data collection.


| void duckdb::ColumnDataCollection::Append | ( | ColumnDataAppendState & | state, |
| DataChunk & | new_chunk ) |
Append a DataChunk to this ColumnDataCollection using the specified append state.


| void duckdb::ColumnDataCollection::InitializeScanChunk | ( | DataChunk & | chunk | ) | const |
Initializes a chunk with the correct types that can be used to call Scan.


| void duckdb::ColumnDataCollection::InitializeScanChunk | ( | Allocator & | allocator, |
| DataChunk & | chunk ) const |
| void duckdb::ColumnDataCollection::InitializeScanChunk | ( | ColumnDataScanState & | state, |
| DataChunk & | chunk ) const |
Initializes a chunk with the correct types for a given scan state.

| void duckdb::ColumnDataCollection::InitializeScan | ( | ColumnDataScanState & | state, |
| ColumnDataScanProperties | properties = ColumnDataScanProperties::ALLOW_ZERO_COPY ) const |
Initializes a Scan state for scanning all columns.


| void duckdb::ColumnDataCollection::InitializeScan | ( | ColumnDataScanState & | state, |
| vector< column_t > | column_ids, | ||
| ColumnDataScanProperties | properties = ColumnDataScanProperties::ALLOW_ZERO_COPY ) const |
Initializes a Scan state for scanning a subset of the columns.
| void duckdb::ColumnDataCollection::InitializeScan | ( | ColumnDataParallelScanState & | state, |
| ColumnDataScanProperties | properties = ColumnDataScanProperties::ALLOW_ZERO_COPY ) const |
Initialize a parallel scan over the column data collection over all columns.

| void duckdb::ColumnDataCollection::InitializeScan | ( | ColumnDataParallelScanState & | state, |
| vector< column_t > | column_ids, | ||
| ColumnDataScanProperties | properties = ColumnDataScanProperties::ALLOW_ZERO_COPY ) const |
Initialize a parallel scan over the column data collection over a subset of the columns.

| bool duckdb::ColumnDataCollection::Scan | ( | ColumnDataScanState & | state, |
| DataChunk & | result ) const |
Scans a DataChunk from the ColumnDataCollection.


| bool duckdb::ColumnDataCollection::Scan | ( | ColumnDataParallelScanState & | state, |
| ColumnDataLocalScanState & | lstate, | ||
| DataChunk & | result ) const |
Scans a DataChunk from the ColumnDataCollection.

| void duckdb::ColumnDataCollection::Append | ( | DataChunk & | new_chunk | ) |
Append a DataChunk directly to this ColumnDataCollection - calls InitializeAppend and Append internally.

| void duckdb::ColumnDataCollection::Combine | ( | ColumnDataCollection & | other | ) |
Appends the other ColumnDataCollection to this, destroying the other data collection.

| void duckdb::ColumnDataCollection::Verify | ( | ) |
| string duckdb::ColumnDataCollection::ToString | ( | ) | const |
| void duckdb::ColumnDataCollection::Print | ( | ) | const |
| void duckdb::ColumnDataCollection::Reset | ( | ) |
| idx_t duckdb::ColumnDataCollection::ChunkCount | ( | ) | const |
Returns the number of data chunks present in the ColumnDataCollection.

Fetch an individual chunk from the ColumnDataCollection.

| ColumnDataChunkIterationHelper duckdb::ColumnDataCollection::Chunks | ( | ) | const |
Constructs a class that can be iterated over to fetch individual chunks Iterating over this is syntactic sugar over just calling Scan


| ColumnDataChunkIterationHelper duckdb::ColumnDataCollection::Chunks | ( | vector< column_t > | column_ids | ) | const |
Constructs a class that can be iterated over to fetch individual chunks Only the column indexes specified in the column_ids list are scanned
| ColumnDataRowIterationHelper duckdb::ColumnDataCollection::Rows | ( | ) | const |
Constructs a class that can be iterated over to fetch individual rows Note that row iteration is slow, and the .Chunks() method should be used instead
| ColumnDataRowCollection duckdb::ColumnDataCollection::GetRows | ( | ) | const |
Returns a materialized set of all of the rows in the column data collection Note that usage of this is slow - avoid using this unless the amount of rows is small, or if you do not care about performance
|
static |
Compare two column data collections to another. If they are equal according to result equality rules, return true. That means null values are equal, and approx equality is used for floating point values. If they are not equal, return false and fill in the error message.


| bool duckdb::ColumnDataCollection::NextScanIndex | ( | ColumnDataScanState & | state, |
| idx_t & | chunk_index, | ||
| idx_t & | segment_index, | ||
| idx_t & | row_index ) const |
Obtains the next scan index to scan from.

| bool duckdb::ColumnDataCollection::PrevScanIndex | ( | ColumnDataScanState & | state, |
| idx_t & | chunk_index, | ||
| idx_t & | segment_index, | ||
| idx_t & | row_index ) const |
Obtains the previous scan index to scan from.

| void duckdb::ColumnDataCollection::ScanAtIndex | ( | ColumnDataParallelScanState & | state, |
| ColumnDataLocalScanState & | lstate, | ||
| DataChunk & | result, | ||
| idx_t | chunk_index, | ||
| idx_t | segment_index, | ||
| idx_t | row_index ) const |
Scans at the indices (obtained from NextScanIndex).

| bool duckdb::ColumnDataCollection::Seek | ( | idx_t | row_idx, |
| ColumnDataScanState & | state, | ||
| DataChunk & | result ) const |
Seeks to the chunk containing the row. Returns false if it is past the end. Note that the returned chunk will likely not be aligned to the given row but the scan state will provide the actual range

| void duckdb::ColumnDataCollection::Initialize | ( | vector< LogicalType > | types | ) |
Initialize the column data collection.

| vector< shared_ptr< StringHeap > > duckdb::ColumnDataCollection::GetHeapReferences | ( | ) |
Get references to the string heaps in this ColumnDataCollection.
| ColumnDataAllocatorType duckdb::ColumnDataCollection::GetAllocatorType | ( | ) | const |
Get the allocator type of this ColumnDataCollection.
| BufferManager & duckdb::ColumnDataCollection::GetBufferManager | ( | ) | const |
Get the buffer manager of the allocator.
| const vector< unique_ptr< ColumnDataCollectionSegment > > & duckdb::ColumnDataCollection::GetSegments | ( | ) | const |
Get a vector of the segments in this ColumnDataCollection.
| void duckdb::ColumnDataCollection::Serialize | ( | Serializer & | serializer | ) | const |
|
static |
|
private |
Creates a new segment within the ColumnDataCollection.

|
staticprivate |