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::StorageIndex Struct Reference
Collaboration diagram for duckdb::StorageIndex:

Public Member Functions

 StorageIndex (idx_t index)
 StorageIndex (const string &field)
 StorageIndex (idx_t index, vector< StorageIndex > child_indexes_p)
 StorageIndex (const string &field, vector< StorageIndex > child_indexes_p)
bool operator== (const StorageIndex &rhs) const
bool operator!= (const StorageIndex &rhs) const
bool operator< (const StorageIndex &rhs) const
bool HasPrimaryIndex () const
idx_t GetPrimaryIndex () const
const string & GetFieldName () const
PhysicalIndex ToPhysical () const
bool HasType () const
const LogicalType & GetScanType () const
const LogicalType & GetType () const
bool HasChildren () const
idx_t ChildIndexCount () const
const StorageIndex & GetChildIndex (idx_t idx) const
StorageIndex & GetChildIndex (idx_t idx)
const vector< StorageIndex > & GetChildIndexes () const
void AddChildIndex (StorageIndex new_index)
void SetType (const LogicalType &type_information)
void SetPushdownExtract ()
bool IsPushdownExtract () const
void SetIndex (idx_t new_index)
bool IsRowIdColumn () const
void Serialize (Serializer &serializer) const

Static Public Member Functions

static StorageIndex FromColumnIndex (const ColumnIndex &column_id)
static StorageIndex Deserialize (Deserializer &deserializer)

Private Attributes

bool has_index = true
idx_t index
string field
LogicalType type = LogicalType::INVALID
StorageIndexType index_type
vector< StorageIndex > child_indexes

Constructor & Destructor Documentation

◆ StorageIndex() [1/5]

duckdb::StorageIndex::StorageIndex ( )
425718 : has_index(true), index(COLUMN_IDENTIFIER_ROW_ID), index_type(StorageIndexType::FULL_READ) {
425719}
float index_type
const column_t COLUMN_IDENTIFIER_ROW_ID
Special value used to signify the ROW ID of a table.
Definition duckdb.cpp:50303

◆ StorageIndex() [2/5]

duckdb::StorageIndex::StorageIndex ( idx_t index)
explicit
425720 : has_index(true), index(index), index_type(StorageIndexType::FULL_READ) {
425721}

◆ StorageIndex() [3/5]

duckdb::StorageIndex::StorageIndex ( const string & field)
explicit
425723 : has_index(false), field(field), index_type(StorageIndexType::FULL_READ) {
425724}

◆ StorageIndex() [4/5]

duckdb::StorageIndex::StorageIndex ( idx_t index,
vector< StorageIndex > child_indexes_p )
425726 : has_index(true), index(index), index_type(StorageIndexType::FULL_READ),
425727 child_indexes(std::move(child_indexes_p)) {
425728}

◆ StorageIndex() [5/5]

duckdb::StorageIndex::StorageIndex ( const string & field,
vector< StorageIndex > child_indexes_p )
425730 : has_index(false), field(field), index_type(StorageIndexType::FULL_READ),
425731 child_indexes(std::move(child_indexes_p)) {
425732}

Member Function Documentation

◆ operator==()

bool duckdb::StorageIndex::operator== ( const StorageIndex & rhs) const
inline
14866 {
14867 return index == rhs.index;
14868 }

◆ operator!=()

bool duckdb::StorageIndex::operator!= ( const StorageIndex & rhs) const
inline
14869 {
14870 return index != rhs.index;
14871 }

◆ operator<()

bool duckdb::StorageIndex::operator< ( const StorageIndex & rhs) const
inline
14872 {
14873 return index < rhs.index;
14874 }

◆ FromColumnIndex()

StorageIndex duckdb::StorageIndex::FromColumnIndex ( const ColumnIndex & column_id)
static
425734 {
425735 vector<StorageIndex> result;
425736 for (auto &child_id : column_id.GetChildIndexes()) {
425737 result.push_back(StorageIndex::FromColumnIndex(child_id));
425738 }
425739 StorageIndex storage_index;
425740 if (column_id.HasPrimaryIndex()) {
425741 storage_index = StorageIndex(column_id.GetPrimaryIndex(), std::move(result));
425742 } else {
425743 storage_index = StorageIndex(column_id.GetFieldName(), std::move(result));
425744 }
425745 if (column_id.HasType()) {
425746 storage_index.SetType(column_id.GetType());
425747 }
425748 if (column_id.IsPushdownExtract()) {
425749 storage_index.SetPushdownExtract();
425750 }
425751 return storage_index;
425752}

◆ HasPrimaryIndex()

bool duckdb::StorageIndex::HasPrimaryIndex ( ) const
425754 {
425755 return has_index;
425756}

◆ GetPrimaryIndex()

idx_t duckdb::StorageIndex::GetPrimaryIndex ( ) const
425757 {
425758 D_ASSERT(has_index);
425759 return index;
425760}

◆ GetFieldName()

const string & duckdb::StorageIndex::GetFieldName ( ) const
425761 {
425762 D_ASSERT(!has_index);
425763 return field;
425764}

◆ ToPhysical()

PhysicalIndex duckdb::StorageIndex::ToPhysical ( ) const
425765 {
425766 D_ASSERT(has_index);
425767 return PhysicalIndex(index);
425768}

◆ HasType()

bool duckdb::StorageIndex::HasType ( ) const
425769 {
425770 return type.id() != LogicalTypeId::INVALID;
425771}

◆ GetScanType()

const LogicalType & duckdb::StorageIndex::GetScanType ( ) const
425772 {
425773 D_ASSERT(HasType());
425774 if (IsPushdownExtract()) {
425775 return child_indexes[0].GetScanType();
425776 }
425777 return GetType();
425778}

◆ GetType()

const LogicalType & duckdb::StorageIndex::GetType ( ) const
425779 {
425780 return type;
425781}

◆ HasChildren()

bool duckdb::StorageIndex::HasChildren ( ) const
425782 {
425783 return !child_indexes.empty();
425784}

◆ ChildIndexCount()

idx_t duckdb::StorageIndex::ChildIndexCount ( ) const
425785 {
425786 return child_indexes.size();
425787}

◆ GetChildIndex() [1/2]

const StorageIndex & duckdb::StorageIndex::GetChildIndex ( idx_t idx) const
425788 {
425789 return child_indexes[idx];
425790}

◆ GetChildIndex() [2/2]

StorageIndex & duckdb::StorageIndex::GetChildIndex ( idx_t idx)
425791 {
425792 return child_indexes[idx];
425793}

◆ GetChildIndexes()

const vector< StorageIndex > & duckdb::StorageIndex::GetChildIndexes ( ) const
425794 {
425795 return child_indexes;
425796}

◆ AddChildIndex()

void duckdb::StorageIndex::AddChildIndex ( StorageIndex new_index)
425797 {
425798 this->child_indexes.push_back(std::move(new_index));
425799}

◆ SetType()

void duckdb::StorageIndex::SetType ( const LogicalType & type_information)
425800 {
425801 type = type_information;
425802}

◆ SetPushdownExtract()

void duckdb::StorageIndex::SetPushdownExtract ( )
425803 {
425804 D_ASSERT(!IsPushdownExtract());
425805 index_type = StorageIndexType::PUSHDOWN_EXTRACT;
425806}

◆ IsPushdownExtract()

bool duckdb::StorageIndex::IsPushdownExtract ( ) const
425807 {
425808 return index_type == StorageIndexType::PUSHDOWN_EXTRACT;
425809}

◆ SetIndex()

void duckdb::StorageIndex::SetIndex ( idx_t new_index)
425810 {
425811 D_ASSERT(has_index);
425812 index = new_index;
425813}

◆ IsRowIdColumn()

bool duckdb::StorageIndex::IsRowIdColumn ( ) const
425814 {
425815 if (!has_index) {
425816 return false;
425817 }
425818 return index == DConstants::INVALID_INDEX;
425819}
static constexpr const idx_t INVALID_INDEX
The value used to signify an invalid index entry.
Definition duckdb.hpp:1117

◆ Serialize()

void duckdb::StorageIndex::Serialize ( Serializer & serializer) const
417854 {
417855 serializer.WritePropertyWithDefault<bool>(100, "has_index", has_index);
417856 serializer.WritePropertyWithDefault<idx_t>(101, "index", index);
417857 serializer.WritePropertyWithDefault<string>(102, "field", field);
417858 serializer.WriteProperty<LogicalType>(103, "type", type);
417859 serializer.WriteProperty<StorageIndexType>(104, "index_type", index_type);
417860 serializer.WritePropertyWithDefault<vector<StorageIndex>>(105, "child_indexes", child_indexes);
417861}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

◆ Deserialize()

StorageIndex duckdb::StorageIndex::Deserialize ( Deserializer & deserializer)
static
417863 {
417864 StorageIndex result;
417865 deserializer.ReadPropertyWithDefault<bool>(100, "has_index", result.has_index);
417866 deserializer.ReadPropertyWithDefault<idx_t>(101, "index", result.index);
417867 deserializer.ReadPropertyWithDefault<string>(102, "field", result.field);
417868 deserializer.ReadProperty<LogicalType>(103, "type", result.type);
417869 deserializer.ReadProperty<StorageIndexType>(104, "index_type", result.index_type);
417870 deserializer.ReadPropertyWithDefault<vector<StorageIndex>>(105, "child_indexes", result.child_indexes);
417871 return result;
417872}

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