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

Public Member Functions

 LogicalCreateIndex (unique_ptr< CreateIndexInfo > info_p, vector< unique_ptr< Expression > > expressions_p, TableCatalogEntry &table_p, unique_ptr< AlterTableInfo > alter_table_info=nullptr)
void Serialize (Serializer &serializer) const override
Public Member Functions inherited from duckdb::LogicalOperator
 LogicalOperator (LogicalOperatorType type)
 LogicalOperator (LogicalOperatorType type, vector< unique_ptr< Expression > > expressions)
virtual vector< ColumnBinding > GetColumnBindings ()
virtual idx_t GetRootIndex ()
void PrintColumnBindings ()
void ResolveOperatorTypes ()
 Resolve the types of the logical operator and its children.
virtual string GetName () const
virtual InsertionOrderPreservingMap< string > ParamsToString () const
virtual string ToString (ExplainFormat format=ExplainFormat::DEFAULT) const
DUCKDB_API void Print ()
virtual void Verify (ClientContext &context)
 Debug method: verify that the integrity of expressions & child nodes are maintained.
void AddChild (unique_ptr< LogicalOperator > child)
virtual idx_t EstimateCardinality (ClientContext &context)
void SetEstimatedCardinality (idx_t _estimated_cardinality)
void SetParamsEstimatedCardinality (InsertionOrderPreservingMap< string > &result) const
virtual unique_ptr< LogicalOperator > Copy (ClientContext &context) const
virtual bool RequireOptimizer () const
virtual bool SupportSerialization () const
 Allows LogicalOperators to opt out of serialization.
virtual bool HasProjectionMap () const
virtual vector< idx_t > GetTableIndex () const
 Returns the set of table indexes of this operator.
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Static Public Member Functions

static unique_ptr< LogicalOperator > Deserialize (Deserializer &deserializer)
Static Public Member Functions inherited from duckdb::LogicalOperator
static string ColumnBindingsToString (const vector< ColumnBinding > &bindings)
static vector< ColumnBinding > GenerateColumnBindings (idx_t table_idx, idx_t column_count)
static vector< LogicalType > MapTypes (const vector< LogicalType > &types, const vector< idx_t > &projection_map)
static vector< ColumnBinding > MapBindings (const vector< ColumnBinding > &types, const vector< idx_t > &projection_map)
static unique_ptr< LogicalOperator > Deserialize (Deserializer &deserializer)

Public Attributes

unique_ptr< CreateIndexInfo > info
 Index creation information.
TableCatalogEntry & table
 The table to create the index for.
unique_ptr< AlterTableInfo > alter_table_info
vector< unique_ptr< Expression > > unbound_expressions
 Unbound expressions of the indexed columns.
Public Attributes inherited from duckdb::LogicalOperator
LogicalOperatorType type
 The type of the logical operator.
vector< unique_ptr< LogicalOperator > > children
 The set of children of the operator.
vector< unique_ptr< Expression > > expressions
 The set of expressions contained within the operator, if any.
vector< LogicalType > types
 The types returned by this logical operator. Set by calling LogicalOperator::ResolveTypes.
idx_t estimated_cardinality
 Estimated Cardinality.
bool has_estimated_cardinality

Static Public Attributes

static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_CREATE_INDEX

Protected Member Functions

void ResolveTypes () override
 Resolve types for this specific operator.

Private Member Functions

 LogicalCreateIndex (ClientContext &context, unique_ptr< CreateInfo > info, vector< unique_ptr< Expression > > expressions, unique_ptr< ParseInfo > alter_info)
TableCatalogEntry & BindTable (ClientContext &context, CreateIndexInfo &info_p)

Constructor & Destructor Documentation

◆ LogicalCreateIndex() [1/2]

duckdb::LogicalCreateIndex::LogicalCreateIndex ( unique_ptr< CreateIndexInfo > info_p,
vector< unique_ptr< Expression > > expressions_p,
TableCatalogEntry & table_p,
unique_ptr< AlterTableInfo > alter_table_info = nullptr )
381787 : LogicalOperator(LogicalOperatorType::LOGICAL_CREATE_INDEX), info(std::move(info_p)), table(table_p),
381788 alter_table_info(std::move(alter_table_info)) {
381789 for (auto &expr : expressions_p) {
381790 unbound_expressions.push_back(expr->Copy());
381791 }
381792 expressions = std::move(expressions_p);
381793
381794 if (info->column_ids.empty()) {
381795 throw BinderException("CREATE INDEX does not refer to any columns in the base table!");
381796 }
381797}
TableCatalogEntry & table
The table to create the index for.
Definition duckdb.cpp:147310
unique_ptr< CreateIndexInfo > info
Index creation information.
Definition duckdb.cpp:147308
vector< unique_ptr< Expression > > unbound_expressions
Unbound expressions of the indexed columns.
Definition duckdb.cpp:147314
vector< unique_ptr< Expression > > expressions
The set of expressions contained within the operator, if any.
Definition duckdb.hpp:21264

◆ LogicalCreateIndex() [2/2]

duckdb::LogicalCreateIndex::LogicalCreateIndex ( ClientContext & context,
unique_ptr< CreateInfo > info,
vector< unique_ptr< Expression > > expressions,
unique_ptr< ParseInfo > alter_info )
private
381802 : LogicalOperator(LogicalOperatorType::LOGICAL_CREATE_INDEX),
381803 info(unique_ptr_cast<CreateInfo, CreateIndexInfo>(std::move(info_p))), table(BindTable(context, *info)),
381804 alter_table_info(unique_ptr_cast<ParseInfo, AlterTableInfo>(std::move(alter_table_info))) {
381805 for (auto &expr : expressions_p) {
381806 unbound_expressions.push_back(expr->Copy());
381807 }
381808 expressions = std::move(expressions_p);
381809}

Member Function Documentation

◆ Serialize()

void duckdb::LogicalCreateIndex::Serialize ( Serializer & serializer) const
overridevirtual

Reimplemented from duckdb::LogicalOperator.

416646 {
416647 LogicalOperator::Serialize(serializer);
416648 serializer.WritePropertyWithDefault<unique_ptr<CreateIndexInfo>>(200, "info", info);
416649 serializer.WritePropertyWithDefault<vector<unique_ptr<Expression>>>(201, "unbound_expressions", unbound_expressions);
416650 serializer.WritePropertyWithDefault<unique_ptr<AlterTableInfo>>(202, "alter_table_info", alter_table_info);
416651}

◆ Deserialize()

unique_ptr< LogicalOperator > duckdb::LogicalCreateIndex::Deserialize ( Deserializer & deserializer)
static
416653 {
416654 auto info = deserializer.ReadPropertyWithDefault<unique_ptr<CreateInfo>>(200, "info");
416655 auto unbound_expressions = deserializer.ReadPropertyWithDefault<vector<unique_ptr<Expression>>>(201, "unbound_expressions");
416656 auto alter_table_info = deserializer.ReadPropertyWithDefault<unique_ptr<ParseInfo>>(202, "alter_table_info");
416657 auto result = duckdb::unique_ptr<LogicalCreateIndex>(new LogicalCreateIndex(deserializer.Get<ClientContext &>(), std::move(info), std::move(unbound_expressions), std::move(alter_table_info)));
416658 return std::move(result);
416659}

◆ ResolveTypes()

void duckdb::LogicalCreateIndex::ResolveTypes ( )
overrideprotectedvirtual

Resolve types for this specific operator.

Implements duckdb::LogicalOperator.

381811 {
381812 types.emplace_back(LogicalType::BIGINT);
381813}
vector< LogicalType > types
The types returned by this logical operator. Set by calling LogicalOperator::ResolveTypes.
Definition duckdb.hpp:21266

◆ BindTable()

TableCatalogEntry & duckdb::LogicalCreateIndex::BindTable ( ClientContext & context,
CreateIndexInfo & info_p )
private
381815 {
381816 auto &catalog = info_p.catalog;
381817 auto &schema = info_p.schema;
381818 auto &table_name = info_p.table;
381819 return Catalog::GetEntry<TableCatalogEntry>(context, catalog, schema, table_name);
381820}
DUCKDB_API optional_ptr< CatalogEntry > GetEntry(ClientContext &context, const string &schema, const EntryLookupInfo &lookup_info, OnEntryNotFound if_not_found)
Gets the "schema.name" entry of the specified type, if entry does not exist behavior depends on OnEnt...
Definition duckdb.cpp:8156

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