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::LogicalCTERef Class Reference

LogicalCTERef represents a reference to a recursive CTE. More...

Inheritance diagram for duckdb::LogicalCTERef:
Collaboration diagram for duckdb::LogicalCTERef:

Public Member Functions

 LogicalCTERef (idx_t table_index, idx_t cte_index, vector< LogicalType > types, vector< string > colnames, bool is_recurring=false)
InsertionOrderPreservingMap< string > ParamsToString () const override
vector< ColumnBinding > GetColumnBindings () override
void Serialize (Serializer &serializer) const override
vector< idx_t > GetTableIndex () const override
 Returns the set of table indexes of this operator.
string GetName () const override
Public Member Functions inherited from duckdb::LogicalOperator
 LogicalOperator (LogicalOperatorType type)
 LogicalOperator (LogicalOperatorType type, vector< unique_ptr< Expression > > expressions)
virtual idx_t GetRootIndex ()
void PrintColumnBindings ()
void ResolveOperatorTypes ()
 Resolve the types of the logical operator and its children.
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
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

vector< string > bound_columns
idx_t table_index
 The table index in the current bind context.
idx_t cte_index
 CTE index.
vector< LogicalType > chunk_types
 The types of the chunk.
idx_t correlated_columns
 Number of correlated columns.
bool is_recurring = false
 Does this operator read the recurring CTE table.
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_CTE_REF

Protected Member Functions

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

Detailed Description

LogicalCTERef represents a reference to a recursive CTE.

Constructor & Destructor Documentation

◆ LogicalCTERef()

duckdb::LogicalCTERef::LogicalCTERef ( idx_t table_index,
idx_t cte_index,
vector< LogicalType > types,
vector< string > colnames,
bool is_recurring = false )
inline
203547 : LogicalOperator(LogicalOperatorType::LOGICAL_CTE_REF), table_index(table_index), cte_index(cte_index),
203549 D_ASSERT(!types.empty());
203550 chunk_types = std::move(types);
203551 bound_columns = std::move(colnames);
203552 }
bool is_recurring
Does this operator read the recurring CTE table.
Definition duckdb.cpp:203564
idx_t cte_index
CTE index.
Definition duckdb.cpp:203558
idx_t correlated_columns
Number of correlated columns.
Definition duckdb.cpp:203562
idx_t table_index
The table index in the current bind context.
Definition duckdb.cpp:203556
vector< LogicalType > chunk_types
The types of the chunk.
Definition duckdb.cpp:203560
vector< LogicalType > types
The types returned by this logical operator. Set by calling LogicalOperator::ResolveTypes.
Definition duckdb.hpp:21266

Member Function Documentation

◆ ParamsToString()

InsertionOrderPreservingMap< string > duckdb::LogicalCTERef::ParamsToString ( ) const
overridevirtual

Reimplemented from duckdb::LogicalOperator.

381876 {
381877 InsertionOrderPreservingMap<string> result;
381878 result["CTE Index"] = StringUtil::Format("%llu", cte_index);
381879 SetParamsEstimatedCardinality(result);
381880 return result;
381881}
static string Format(const string fmt_str, ARGS... params)
Format a string using printf semantics.
Definition duckdb.hpp:4002

◆ GetColumnBindings()

vector< ColumnBinding > duckdb::LogicalCTERef::GetColumnBindings ( )
inlineoverridevirtual

Reimplemented from duckdb::LogicalOperator.

203568 {
203569 return GenerateColumnBindings(table_index, chunk_types.size());
203570 }

◆ Serialize()

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

Reimplemented from duckdb::LogicalOperator.

416561 {
416562 LogicalOperator::Serialize(serializer);
416563 serializer.WritePropertyWithDefault<idx_t>(200, "table_index", table_index);
416564 serializer.WritePropertyWithDefault<idx_t>(201, "cte_index", cte_index);
416565 serializer.WritePropertyWithDefault<vector<LogicalType>>(202, "chunk_types", chunk_types);
416566 serializer.WritePropertyWithDefault<vector<string>>(203, "bound_columns", bound_columns);
416567 /* [Deleted] (CTEMaterialize) "materialized_cte" */
416568 serializer.WritePropertyWithDefault<bool>(205, "is_recurring", is_recurring);
416569}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

◆ Deserialize()

unique_ptr< LogicalOperator > duckdb::LogicalCTERef::Deserialize ( Deserializer & deserializer)
static
416571 {
416572 auto table_index = deserializer.ReadPropertyWithDefault<idx_t>(200, "table_index");
416573 auto cte_index = deserializer.ReadPropertyWithDefault<idx_t>(201, "cte_index");
416574 auto chunk_types = deserializer.ReadPropertyWithDefault<vector<LogicalType>>(202, "chunk_types");
416575 auto bound_columns = deserializer.ReadPropertyWithDefault<vector<string>>(203, "bound_columns");
416576 auto result = duckdb::unique_ptr<LogicalCTERef>(new LogicalCTERef(table_index, cte_index, std::move(chunk_types), std::move(bound_columns)));
416577 deserializer.ReadDeletedProperty<CTEMaterialize>(204, "materialized_cte");
416578 deserializer.ReadPropertyWithDefault<bool>(205, "is_recurring", result->is_recurring);
416579 return std::move(result);
416580}

◆ GetTableIndex()

vector< idx_t > duckdb::LogicalCTERef::GetTableIndex ( ) const
overridevirtual

Returns the set of table indexes of this operator.

Reimplemented from duckdb::LogicalOperator.

381883 {
381884 return vector<idx_t> {table_index};
381885}

◆ GetName()

string duckdb::LogicalCTERef::GetName ( ) const
overridevirtual

Reimplemented from duckdb::LogicalOperator.

381887 {
381888#ifdef DEBUG
381890 return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index);
381891 }
381892#endif
381893 return LogicalOperator::GetName();
381894}
static bool debug_print_bindings
Whether to print bindings when printing the plan (debug mode only).
Definition duckdb.hpp:40040

◆ ResolveTypes()

void duckdb::LogicalCTERef::ResolveTypes ( )
inlineoverrideprotectedvirtual

Resolve types for this specific operator.

Implements duckdb::LogicalOperator.

203577 {
203578 // types are resolved in the constructor
203579 this->types = chunk_types;
203580 }

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