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

Public Types

using Aggregates = vector< AggregateObject >
 
using ValidityBytes = TemplatedValidityMask< uint8_t >
 

Public Member Functions

 TupleDataLayout ()
 Creates an empty TupleDataLayout.
 
TupleDataLayout Copy () const
 Create a copy of this TupleDataLayout.
 
void Initialize (vector< LogicalType > types_p, Aggregates aggregates_p, TupleDataValidityType validity_type, TupleDataNestednessType nestedness_type=TupleDataNestednessType::TOP_LEVEL_LAYOUT)
 Initializes the TupleDataLayout with the specified types and aggregates to an empty TupleDataLayout.
 
void Initialize (vector< LogicalType > types, TupleDataValidityType validity_type, TupleDataNestednessType nestedness_type=TupleDataNestednessType::TOP_LEVEL_LAYOUT)
 Initializes the TupleDataLayout with the specified types to an empty TupleDataLayout.
 
void Initialize (Aggregates aggregates_p)
 Initializes the TupleDataLayout with the specified aggregates to an empty TupleDataLayout.
 
void Initialize (const vector< BoundOrderByNode > &orders, const LogicalType &type, bool has_payload)
 Initializes a TupleDataLayout with the specified ORDER BY to an empty TupleDataLayout.
 
idx_t ColumnCount () const
 Returns the number of data columns.
 
const vector< LogicalType > & GetTypes () const
 Returns a list of the column types for this data chunk.
 
idx_t AggregateCount () const
 Returns the number of aggregates.
 
AggregatesGetAggregates ()
 Returns a list of the aggregates for this data chunk.
 
const AggregatesGetAggregates () const
 
SortKeyType GetSortKeyType () const
 Gets the sort key type of this layout (if applicable)
 
bool IsSortKeyLayout () const
 Returns whether this is a sort key layout (in implementation file to avoid including here)
 
const TupleDataLayoutGetStructLayout (idx_t col_idx) const
 Returns a map from column id to the struct TupleDataLayout.
 
idx_t GetRowWidth () const
 Returns the total width required for each row, including padding.
 
idx_t GetDataOffset () const
 Returns the offset to the start of the data.
 
idx_t GetDataWidth () const
 Returns the total width required for the data, including padding.
 
idx_t GetAggrOffset () const
 Returns the offset to the start of the aggregates.
 
idx_t GetAggrWidth () const
 Returns the total width required for the aggregates, including padding.
 
idx_t GetSortWidth () const
 Returns the total width required for sorting.
 
const vector< idx_t > & GetSortSkippableBytes () const
 
const vector< idx_t > & GetOffsets () const
 Returns the column offsets into each row.
 
bool AllConstant () const
 Returns whether all columns in this layout are constant size.
 
const vector< idx_t > & GetVariableColumns () const
 
idx_t GetHeapSizeOffset () const
 Gets offset to where heap size is stored.
 
bool HasDestructor () const
 Returns whether any of the aggregates have a destructor.
 
const vector< idx_t > & GetAggregateDestructorIndices () const
 Returns the indices of the aggregates that have destructors.
 
bool AllValid () const
 Returns whether none of the columns have NULLs.
 

Private Attributes

vector< LogicalTypetypes
 The types of the data columns.
 
Aggregates aggregates
 The aggregate functions.
 
SortKeyType sort_key_type
 The sort key type associated with orders.
 
unique_ptr< unordered_map< idx_t, TupleDataLayout > > struct_layouts
 Structs are a recursive TupleDataLayout.
 
idx_t flag_width
 The width of the validity header.
 
idx_t data_width
 The width of the data portion.
 
idx_t aggr_width
 The width of the aggregate state portion.
 
idx_t sort_width
 The width of the sort key.
 
vector< idx_tsort_skippable_bytes
 Bytes that are skippable during sorting.
 
idx_t row_width
 The width of the entire row.
 
vector< idx_toffsets
 The offsets to the columns and aggregate data in each row.
 
bool all_constant
 Whether all columns in this layout are constant size.
 
vector< idx_tvariable_columns
 Indices of the variable columns.
 
idx_t heap_size_offset
 Offset to the heap size of every row.
 
vector< idx_taggr_destructor_idxs
 Indices of aggregate functions that have a destructor.
 
TupleDataValidityType validity_type
 Whether none of the columns have NULLs.
 

Member Function Documentation

◆ ColumnCount()

idx_t duckdb::TupleDataLayout::ColumnCount ( ) const
inline

Returns the number of data columns.

56148 {
56149 return types.size();
56150 }
vector< LogicalType > types
The types of the data columns.
Definition duckdb.cpp:56236

◆ GetTypes()

const vector< LogicalType > & duckdb::TupleDataLayout::GetTypes ( ) const
inline

Returns a list of the column types for this data chunk.

56152 {
56153 return types;
56154 }

◆ AggregateCount()

idx_t duckdb::TupleDataLayout::AggregateCount ( ) const
inline

Returns the number of aggregates.

56156 {
56157 return aggregates.size();
56158 }
Aggregates aggregates
The aggregate functions.
Definition duckdb.cpp:56238

◆ GetAggregates() [1/2]

Aggregates & duckdb::TupleDataLayout::GetAggregates ( )
inline

Returns a list of the aggregates for this data chunk.

56160 {
56161 return aggregates;
56162 }

◆ GetAggregates() [2/2]

const Aggregates & duckdb::TupleDataLayout::GetAggregates ( ) const
inline
56163 {
56164 return aggregates;
56165 }

◆ GetSortKeyType()

SortKeyType duckdb::TupleDataLayout::GetSortKeyType ( ) const
inline

Gets the sort key type of this layout (if applicable)

56167 {
56168 return sort_key_type;
56169 }
SortKeyType sort_key_type
The sort key type associated with orders.
Definition duckdb.cpp:56240

◆ GetStructLayout()

const TupleDataLayout & duckdb::TupleDataLayout::GetStructLayout ( idx_t  col_idx) const
inline

Returns a map from column id to the struct TupleDataLayout.

56173 {
56174 D_ASSERT(struct_layouts->find(col_idx) != struct_layouts->end());
56175 return struct_layouts->find(col_idx)->second;
56176 }
unique_ptr< unordered_map< idx_t, TupleDataLayout > > struct_layouts
Structs are a recursive TupleDataLayout.
Definition duckdb.cpp:56242

◆ GetRowWidth()

idx_t duckdb::TupleDataLayout::GetRowWidth ( ) const
inline

Returns the total width required for each row, including padding.

56178 {
56179 return row_width;
56180 }
idx_t row_width
The width of the entire row.
Definition duckdb.cpp:56254

◆ GetDataOffset()

idx_t duckdb::TupleDataLayout::GetDataOffset ( ) const
inline

Returns the offset to the start of the data.

56182 {
56183 return flag_width;
56184 }
idx_t flag_width
The width of the validity header.
Definition duckdb.cpp:56244

◆ GetDataWidth()

idx_t duckdb::TupleDataLayout::GetDataWidth ( ) const
inline

Returns the total width required for the data, including padding.

56186 {
56187 return data_width;
56188 }
idx_t data_width
The width of the data portion.
Definition duckdb.cpp:56246

◆ GetAggrOffset()

idx_t duckdb::TupleDataLayout::GetAggrOffset ( ) const
inline

Returns the offset to the start of the aggregates.

56190 {
56191 return flag_width + data_width;
56192 }

◆ GetAggrWidth()

idx_t duckdb::TupleDataLayout::GetAggrWidth ( ) const
inline

Returns the total width required for the aggregates, including padding.

56194 {
56195 return aggr_width;
56196 }
idx_t aggr_width
The width of the aggregate state portion.
Definition duckdb.cpp:56248

◆ GetSortWidth()

idx_t duckdb::TupleDataLayout::GetSortWidth ( ) const
inline

Returns the total width required for sorting.

56198 {
56199 D_ASSERT(IsSortKeyLayout());
56200 return sort_width;
56201 }
idx_t sort_width
The width of the sort key.
Definition duckdb.cpp:56250
bool IsSortKeyLayout() const
Returns whether this is a sort key layout (in implementation file to avoid including here)
Here is the call graph for this function:

◆ GetSortSkippableBytes()

const vector< idx_t > & duckdb::TupleDataLayout::GetSortSkippableBytes ( ) const
inline
56202 {
56203 D_ASSERT(IsSortKeyLayout());
56204 return sort_skippable_bytes;
56205 }
vector< idx_t > sort_skippable_bytes
Bytes that are skippable during sorting.
Definition duckdb.cpp:56252

◆ GetOffsets()

const vector< idx_t > & duckdb::TupleDataLayout::GetOffsets ( ) const
inline

Returns the column offsets into each row.

56207 {
56208 return offsets;
56209 }
vector< idx_t > offsets
The offsets to the columns and aggregate data in each row.
Definition duckdb.cpp:56256

◆ AllConstant()

bool duckdb::TupleDataLayout::AllConstant ( ) const
inline

Returns whether all columns in this layout are constant size.

56211 {
56212 return all_constant;
56213 }
bool all_constant
Whether all columns in this layout are constant size.
Definition duckdb.cpp:56258

◆ GetVariableColumns()

const vector< idx_t > & duckdb::TupleDataLayout::GetVariableColumns ( ) const
inline
56214 {
56215 return variable_columns;
56216 }
vector< idx_t > variable_columns
Indices of the variable columns.
Definition duckdb.cpp:56260

◆ GetHeapSizeOffset()

idx_t duckdb::TupleDataLayout::GetHeapSizeOffset ( ) const
inline

Gets offset to where heap size is stored.

56218 {
56219 return heap_size_offset;
56220 }
idx_t heap_size_offset
Offset to the heap size of every row.
Definition duckdb.cpp:56262

◆ HasDestructor()

bool duckdb::TupleDataLayout::HasDestructor ( ) const
inline

Returns whether any of the aggregates have a destructor.

56222 {
56223 return !aggr_destructor_idxs.empty();
56224 }
vector< idx_t > aggr_destructor_idxs
Indices of aggregate functions that have a destructor.
Definition duckdb.cpp:56264

◆ GetAggregateDestructorIndices()

const vector< idx_t > & duckdb::TupleDataLayout::GetAggregateDestructorIndices ( ) const
inline

Returns the indices of the aggregates that have destructors.

56226 {
56227 return aggr_destructor_idxs;
56228 }

◆ AllValid()

bool duckdb::TupleDataLayout::AllValid ( ) const
inline

Returns whether none of the columns have NULLs.

56230 {
56231 return validity_type == TupleDataValidityType::CANNOT_HAVE_NULL_VALUES;
56232 }
TupleDataValidityType validity_type
Whether none of the columns have NULLs.
Definition duckdb.cpp:56266

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