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

Public Member Functions

 LogicalSetOperation (idx_t table_index, idx_t column_count, unique_ptr< LogicalOperator > top, unique_ptr< LogicalOperator > bottom, LogicalOperatorType type, bool setop_all, bool allow_out_of_order=true)
 LogicalSetOperation (idx_t table_index, idx_t column_count, vector< unique_ptr< LogicalOperator > > children, LogicalOperatorType type, bool setop_all, bool allow_out_of_order=true)
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 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
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

idx_t table_index
idx_t column_count
bool setop_all
bool allow_out_of_order
 Whether or not UNION statements can be executed out of order.
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_INVALID

Protected Member Functions

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

Private Member Functions

 LogicalSetOperation (idx_t table_index, idx_t column_count, LogicalOperatorType type, bool setop_all, bool allow_out_of_order)

Constructor & Destructor Documentation

◆ LogicalSetOperation() [1/3]

duckdb::LogicalSetOperation::LogicalSetOperation ( idx_t table_index,
idx_t column_count,
LogicalOperatorType type,
bool setop_all,
bool allow_out_of_order )
private
383062 : LogicalOperator(type), table_index(table_index), column_count(column_count), setop_all(setop_all),
383064}
LogicalOperatorType type
The type of the logical operator.
Definition duckdb.hpp:21260
bool allow_out_of_order
Whether or not UNION statements can be executed out of order.
Definition duckdb.cpp:206033

◆ LogicalSetOperation() [2/3]

duckdb::LogicalSetOperation::LogicalSetOperation ( idx_t table_index,
idx_t column_count,
unique_ptr< LogicalOperator > top,
unique_ptr< LogicalOperator > bottom,
LogicalOperatorType type,
bool setop_all,
bool allow_out_of_order = true )
383079 : LogicalOperator(type), table_index(table_index), column_count(column_count), setop_all(setop_all),
383081 D_ASSERT(type == LogicalOperatorType::LOGICAL_UNION || type == LogicalOperatorType::LOGICAL_EXCEPT ||
383082 type == LogicalOperatorType::LOGICAL_INTERSECT);
383083 children.push_back(std::move(top));
383084 children.push_back(std::move(bottom));
383085}
vector< unique_ptr< LogicalOperator > > children
The set of children of the operator.
Definition duckdb.hpp:21262

◆ LogicalSetOperation() [3/3]

duckdb::LogicalSetOperation::LogicalSetOperation ( idx_t table_index,
idx_t column_count,
vector< unique_ptr< LogicalOperator > > children,
LogicalOperatorType type,
bool setop_all,
bool allow_out_of_order = true )
383069 : LogicalOperator(type), table_index(table_index), column_count(column_count), setop_all(setop_all),
383071 D_ASSERT(type == LogicalOperatorType::LOGICAL_UNION || type == LogicalOperatorType::LOGICAL_EXCEPT ||
383072 type == LogicalOperatorType::LOGICAL_INTERSECT);
383073 children = std::move(children_p);
383074}

Member Function Documentation

◆ GetColumnBindings()

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

Reimplemented from duckdb::LogicalOperator.

206036 {
206037 return GenerateColumnBindings(table_index, column_count);
206038 }

◆ Serialize()

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

Reimplemented from duckdb::LogicalOperator.

417016 {
417017 LogicalOperator::Serialize(serializer);
417018 serializer.WritePropertyWithDefault<idx_t>(200, "table_index", table_index);
417019 serializer.WritePropertyWithDefault<idx_t>(201, "column_count", column_count);
417020 serializer.WritePropertyWithDefault<bool>(202, "setop_all", setop_all, true);
417021 serializer.WritePropertyWithDefault<bool>(203, "allow_out_of_order", allow_out_of_order, true);
417022}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

◆ Deserialize()

unique_ptr< LogicalOperator > duckdb::LogicalSetOperation::Deserialize ( Deserializer & deserializer)
static
417024 {
417025 auto table_index = deserializer.ReadPropertyWithDefault<idx_t>(200, "table_index");
417026 auto column_count = deserializer.ReadPropertyWithDefault<idx_t>(201, "column_count");
417027 auto setop_all = deserializer.ReadPropertyWithExplicitDefault<bool>(202, "setop_all", true);
417028 auto allow_out_of_order = deserializer.ReadPropertyWithExplicitDefault<bool>(203, "allow_out_of_order", true);
417029 auto result = duckdb::unique_ptr<LogicalSetOperation>(new LogicalSetOperation(table_index, column_count, deserializer.Get<LogicalOperatorType>(), setop_all, allow_out_of_order));
417030 return std::move(result);
417031}

◆ GetTableIndex()

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

Returns the set of table indexes of this operator.

Reimplemented from duckdb::LogicalOperator.

383087 {
383088 return vector<idx_t> {table_index};
383089}

◆ GetName()

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

Reimplemented from duckdb::LogicalOperator.

383091 {
383092#ifdef DEBUG
383094 return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index);
383095 }
383096#endif
383097 return LogicalOperator::GetName();
383098}
static string Format(const string fmt_str, ARGS... params)
Format a string using printf semantics.
Definition duckdb.hpp:4002
static bool debug_print_bindings
Whether to print bindings when printing the plan (debug mode only).
Definition duckdb.hpp:40040

◆ ResolveTypes()

void duckdb::LogicalSetOperation::ResolveTypes ( )
inlineoverrideprotectedvirtual

Resolve types for this specific operator.

Implements duckdb::LogicalOperator.

206047 {
206048 types = children[0]->types;
206049 }
vector< LogicalType > types
The types returned by this logical operator. Set by calling LogicalOperator::ResolveTypes.
Definition duckdb.hpp:21266

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