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::LogicalOperator Class Referenceabstract

#include <duckdb.hpp>

Inheritance diagram for duckdb::LogicalOperator:
Collaboration diagram for duckdb::LogicalOperator:

Public Member Functions

 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 void Serialize (Serializer &serializer) 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 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

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

Protected Member Functions

virtual void ResolveTypes ()=0
 Resolve types for this specific operator.

Detailed Description

LogicalOperator is the base class of the logical operators present in the logical query tree

Constructor & Destructor Documentation

◆ LogicalOperator() [1/2]

duckdb::LogicalOperator::LogicalOperator ( LogicalOperatorType type)
explicit
380473 : type(type), estimated_cardinality(0), has_estimated_cardinality(false) {
380474}
LogicalOperatorType type
The type of the logical operator.
Definition duckdb.hpp:21260
idx_t estimated_cardinality
Estimated Cardinality.
Definition duckdb.hpp:21268

◆ LogicalOperator() [2/2]

duckdb::LogicalOperator::LogicalOperator ( LogicalOperatorType type,
vector< unique_ptr< Expression > > expressions )
380477 : type(type), expressions(std::move(expressions)), estimated_cardinality(0), has_estimated_cardinality(false) {
380478}
vector< unique_ptr< Expression > > expressions
The set of expressions contained within the operator, if any.
Definition duckdb.hpp:21264

◆ ~LogicalOperator()

duckdb::LogicalOperator::~LogicalOperator ( )
virtual
380480 {
380481}

Member Function Documentation

◆ GetColumnBindings()

vector< ColumnBinding > duckdb::LogicalOperator::GetColumnBindings ( )
virtual
380483 {
380484 return {ColumnBinding(0, 0)};
380485}

◆ GetRootIndex()

idx_t duckdb::LogicalOperator::GetRootIndex ( )
virtual
380487 {
380488 auto bindings = GetColumnBindings();
380489 if (bindings.empty()) {
380490 throw InternalException("Empty bindings in GetRootIndex");
380491 }
380492 auto root_index = bindings[0].table_index;
380493 for (idx_t i = 1; i < bindings.size(); i++) {
380494 if (bindings[i].table_index != root_index) {
380495 throw InternalException("GetRootIndex - multiple column bindings found");
380496 }
380497 }
380498 return root_index;
380499}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

◆ ColumnBindingsToString()

string duckdb::LogicalOperator::ColumnBindingsToString ( const vector< ColumnBinding > & bindings)
static
380512 {
380513 string result = "{";
380514 for (idx_t i = 0; i < bindings.size(); i++) {
380515 if (i != 0) {
380516 result += ", ";
380517 }
380518 result += bindings[i].ToString();
380519 }
380520 return result + "}";
380521}

◆ PrintColumnBindings()

void duckdb::LogicalOperator::PrintColumnBindings ( )
380523 {
380524 Printer::Print(ColumnBindingsToString(GetColumnBindings()));
380525}
static DUCKDB_API void Print(OutputStream stream, const string &str)
Print the object to the stream.
Definition duckdb.cpp:92556

◆ GenerateColumnBindings()

vector< ColumnBinding > duckdb::LogicalOperator::GenerateColumnBindings ( idx_t table_idx,
idx_t column_count )
static
380557 {
380558 vector<ColumnBinding> result;
380559 result.reserve(column_count);
380560 for (idx_t i = 0; i < column_count; i++) {
380561 result.emplace_back(table_idx, i);
380562 }
380563 return result;
380564}

◆ MapTypes()

vector< LogicalType > duckdb::LogicalOperator::MapTypes ( const vector< LogicalType > & types,
const vector< idx_t > & projection_map )
static
380566 {
380567 if (projection_map.empty()) {
380568 return types;
380569 } else {
380570 vector<LogicalType> result_types;
380571 result_types.reserve(projection_map.size());
380572 for (auto index : projection_map) {
380573 result_types.push_back(types[index]);
380574 }
380575 return result_types;
380576 }
380577}
vector< LogicalType > types
The types returned by this logical operator. Set by calling LogicalOperator::ResolveTypes.
Definition duckdb.hpp:21266

◆ MapBindings()

vector< ColumnBinding > duckdb::LogicalOperator::MapBindings ( const vector< ColumnBinding > & types,
const vector< idx_t > & projection_map )
static
380580 {
380581 if (projection_map.empty()) {
380582 return bindings;
380583 } else {
380584 vector<ColumnBinding> result_bindings;
380585 result_bindings.reserve(projection_map.size());
380586 for (auto index : projection_map) {
380587 D_ASSERT(index < bindings.size());
380588 result_bindings.push_back(bindings[index]);
380589 }
380590 return result_bindings;
380591 }
380592}

◆ ResolveOperatorTypes()

void duckdb::LogicalOperator::ResolveOperatorTypes ( )

Resolve the types of the logical operator and its children.

380546 {
380547 types.clear();
380548 // first resolve child types
380549 for (auto &child : children) {
380550 child->ResolveOperatorTypes();
380551 }
380552 // now resolve the types for this operator
380553 ResolveTypes();
380554 D_ASSERT(types.size() == GetColumnBindings().size());
380555}
virtual void ResolveTypes()=0
Resolve types for this specific operator.
vector< unique_ptr< LogicalOperator > > children
The set of children of the operator.
Definition duckdb.hpp:21262
GOpaque< Size > size(const GMat &src)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetName()

string duckdb::LogicalOperator::GetName ( ) const
virtual
380528 {
380529 return LogicalOperatorToString(type);
380530}

◆ ParamsToString()

InsertionOrderPreservingMap< string > duckdb::LogicalOperator::ParamsToString ( ) const
virtual
380532 {
380533 InsertionOrderPreservingMap<string> result;
380534 string expressions_info;
380535 for (idx_t i = 0; i < expressions.size(); i++) {
380536 if (i > 0) {
380537 expressions_info += "\n";
380538 }
380539 expressions_info += expressions[i]->GetName();
380540 }
380541 result["Expressions"] = expressions_info;
380542 SetParamsEstimatedCardinality(result);
380543 return result;
380544}

◆ ToString()

string duckdb::LogicalOperator::ToString ( ExplainFormat format = ExplainFormat::DEFAULT) const
virtual
380594 {
380595 auto renderer = TreeRenderer::CreateRenderer(format);
380596 duckdb::stringstream ss;
380597 auto tree = RenderTree::CreateRenderTree(*this);
380598 renderer->ToStream(*tree, ss);
380599 return ss.str();
380600}
std::basic_string< Char > format(const S &format_str, Args &&... args)
Definition duckdb.cpp:16295

◆ Print()

void duckdb::LogicalOperator::Print ( )
380676 {
380677 Printer::Print(ToString());
380678}

◆ Verify()

void duckdb::LogicalOperator::Verify ( ClientContext & context)
virtual

Debug method: verify that the integrity of expressions & child nodes are maintained.

380602 {
380603#ifdef DEBUG
380604 // verify expressions
380605 for (idx_t expr_idx = 0; expr_idx < expressions.size(); expr_idx++) {
380606 auto str = expressions[expr_idx]->ToString();
380607 // verify that we can (correctly) copy this expression
380608 auto copy = expressions[expr_idx]->Copy();
380609 auto original_hash = expressions[expr_idx]->Hash();
380610 auto copy_hash = copy->Hash();
380611 // copy should be identical to original
380612 D_ASSERT(expressions[expr_idx]->ToString() == copy->ToString());
380613 D_ASSERT(original_hash == copy_hash);
380614 D_ASSERT(Expression::Equals(expressions[expr_idx], copy));
380615
380616 for (idx_t other_idx = 0; other_idx < expr_idx; other_idx++) {
380617 // comparison with other expressions
380618 auto other_hash = expressions[other_idx]->Hash();
380619 bool expr_equal = Expression::Equals(expressions[expr_idx], expressions[other_idx]);
380620 if (original_hash != other_hash) {
380621 // if the hashes are not equal the expressions should not be equal either
380622 D_ASSERT(!expr_equal);
380623 }
380624 }
380625 D_ASSERT(!str.empty());
380626
380627 // verify that serialization + deserialization round-trips correctly
380628 if (expressions[expr_idx]->HasParameter()) {
380629 continue;
380630 }
380631 MemoryStream stream(Allocator::Get(context));
380632 // We are serializing a query plan
380633 try {
380634 BinarySerializer::Serialize(*expressions[expr_idx], stream);
380635 } catch (NotImplementedException &ex) {
380636 // ignore for now (FIXME)
380637 continue;
380638 }
380639 // Rewind the stream
380640 stream.Rewind();
380641
380642 bound_parameter_map_t parameters;
380643 auto deserialized_expression = BinaryDeserializer::Deserialize<Expression>(stream, context, parameters);
380644
380645 // FIXME: expressions might not be equal yet because of statistics propagation
380646 continue;
380647 D_ASSERT(Expression::Equals(expressions[expr_idx], deserialized_expression));
380648 D_ASSERT(expressions[expr_idx]->Hash() == deserialized_expression->Hash());
380649 }
380650 D_ASSERT(!ToString().empty());
380651 for (auto &child : children) {
380652 child->Verify(context);
380653 }
380654#endif
380655}
bool Equals(const BaseExpression &other) const override
Returns true if this expression is equal to another expression.
Definition duckdb.hpp:17762
Here is the call graph for this function:

◆ AddChild()

void duckdb::LogicalOperator::AddChild ( unique_ptr< LogicalOperator > child)
380657 {
380658 D_ASSERT(child);
380659 children.push_back(std::move(child));
380660}

◆ EstimateCardinality()

idx_t duckdb::LogicalOperator::EstimateCardinality ( ClientContext & context)
virtual
380662 {
380663 // simple estimator, just take the max of the children
380664 if (has_estimated_cardinality) {
380665 return estimated_cardinality;
380666 }
380667 idx_t max_cardinality = 0;
380668 for (auto &child : children) {
380669 max_cardinality = MaxValue(child->EstimateCardinality(context), max_cardinality);
380670 }
380671 has_estimated_cardinality = true;
380672 estimated_cardinality = max_cardinality;
380673 return estimated_cardinality;
380674}

◆ SetEstimatedCardinality()

void duckdb::LogicalOperator::SetEstimatedCardinality ( idx_t _estimated_cardinality)
380506 {
380507 estimated_cardinality = _estimated_cardinality;
380508 has_estimated_cardinality = true;
380509}

◆ SetParamsEstimatedCardinality()

void duckdb::LogicalOperator::SetParamsEstimatedCardinality ( InsertionOrderPreservingMap< string > & result) const
380500 {
380501 if (has_estimated_cardinality) {
380502 result[RenderTreeNode::ESTIMATED_CARDINALITY] = StringUtil::Format("%llu", estimated_cardinality);
380503 }
380504}
static string Format(const string fmt_str, ARGS... params)
Format a string using printf semantics.
Definition duckdb.hpp:4002

◆ Serialize()

void duckdb::LogicalOperator::Serialize ( Serializer & serializer) const
virtual
416285 {
416286 serializer.WriteProperty<LogicalOperatorType>(100, "type", type);
416287 serializer.WritePropertyWithDefault<vector<unique_ptr<LogicalOperator>>>(101, "children", children);
416288}

◆ Deserialize()

unique_ptr< LogicalOperator > duckdb::LogicalOperator::Deserialize ( Deserializer & deserializer)
static
416290 {
416291 auto type = deserializer.ReadProperty<LogicalOperatorType>(100, "type");
416292 auto children = deserializer.ReadPropertyWithDefault<vector<unique_ptr<LogicalOperator>>>(101, "children");
416293 deserializer.Set<LogicalOperatorType>(type);
416294 unique_ptr<LogicalOperator> result;
416295 switch (type) {
416296 case LogicalOperatorType::LOGICAL_AGGREGATE_AND_GROUP_BY:
416297 result = LogicalAggregate::Deserialize(deserializer);
416298 break;
416299 case LogicalOperatorType::LOGICAL_ALTER:
416300 result = LogicalSimple::Deserialize(deserializer);
416301 break;
416302 case LogicalOperatorType::LOGICAL_ANY_JOIN:
416303 result = LogicalAnyJoin::Deserialize(deserializer);
416304 break;
416305 case LogicalOperatorType::LOGICAL_ASOF_JOIN:
416306 result = LogicalComparisonJoin::Deserialize(deserializer);
416307 break;
416308 case LogicalOperatorType::LOGICAL_ATTACH:
416309 result = LogicalSimple::Deserialize(deserializer);
416310 break;
416311 case LogicalOperatorType::LOGICAL_CHUNK_GET:
416312 result = LogicalColumnDataGet::Deserialize(deserializer);
416313 break;
416314 case LogicalOperatorType::LOGICAL_COMPARISON_JOIN:
416315 result = LogicalComparisonJoin::Deserialize(deserializer);
416316 break;
416317 case LogicalOperatorType::LOGICAL_COPY_DATABASE:
416318 result = LogicalCopyDatabase::Deserialize(deserializer);
416319 break;
416320 case LogicalOperatorType::LOGICAL_COPY_TO_FILE:
416321 result = LogicalCopyToFile::Deserialize(deserializer);
416322 break;
416323 case LogicalOperatorType::LOGICAL_CREATE_INDEX:
416324 result = LogicalCreateIndex::Deserialize(deserializer);
416325 break;
416326 case LogicalOperatorType::LOGICAL_CREATE_MACRO:
416327 result = LogicalCreate::Deserialize(deserializer);
416328 break;
416329 case LogicalOperatorType::LOGICAL_CREATE_SCHEMA:
416330 result = LogicalCreate::Deserialize(deserializer);
416331 break;
416332 case LogicalOperatorType::LOGICAL_CREATE_SEQUENCE:
416333 result = LogicalCreate::Deserialize(deserializer);
416334 break;
416335 case LogicalOperatorType::LOGICAL_CREATE_TABLE:
416336 result = LogicalCreateTable::Deserialize(deserializer);
416337 break;
416338 case LogicalOperatorType::LOGICAL_CREATE_TYPE:
416339 result = LogicalCreate::Deserialize(deserializer);
416340 break;
416341 case LogicalOperatorType::LOGICAL_CREATE_VIEW:
416342 result = LogicalCreate::Deserialize(deserializer);
416343 break;
416344 case LogicalOperatorType::LOGICAL_CROSS_PRODUCT:
416345 result = LogicalCrossProduct::Deserialize(deserializer);
416346 break;
416347 case LogicalOperatorType::LOGICAL_CTE_REF:
416348 result = LogicalCTERef::Deserialize(deserializer);
416349 break;
416350 case LogicalOperatorType::LOGICAL_DELETE:
416351 result = LogicalDelete::Deserialize(deserializer);
416352 break;
416353 case LogicalOperatorType::LOGICAL_DELIM_GET:
416354 result = LogicalDelimGet::Deserialize(deserializer);
416355 break;
416356 case LogicalOperatorType::LOGICAL_DELIM_JOIN:
416357 result = LogicalComparisonJoin::Deserialize(deserializer);
416358 break;
416359 case LogicalOperatorType::LOGICAL_DETACH:
416360 result = LogicalSimple::Deserialize(deserializer);
416361 break;
416362 case LogicalOperatorType::LOGICAL_DISTINCT:
416363 result = LogicalDistinct::Deserialize(deserializer);
416364 break;
416365 case LogicalOperatorType::LOGICAL_DROP:
416366 result = LogicalSimple::Deserialize(deserializer);
416367 break;
416368 case LogicalOperatorType::LOGICAL_DUMMY_SCAN:
416369 result = LogicalDummyScan::Deserialize(deserializer);
416370 break;
416371 case LogicalOperatorType::LOGICAL_EMPTY_RESULT:
416372 result = LogicalEmptyResult::Deserialize(deserializer);
416373 break;
416374 case LogicalOperatorType::LOGICAL_EXCEPT:
416375 result = LogicalSetOperation::Deserialize(deserializer);
416376 break;
416377 case LogicalOperatorType::LOGICAL_EXPLAIN:
416378 result = LogicalExplain::Deserialize(deserializer);
416379 break;
416380 case LogicalOperatorType::LOGICAL_EXPORT:
416381 result = LogicalExport::Deserialize(deserializer);
416382 break;
416383 case LogicalOperatorType::LOGICAL_EXPRESSION_GET:
416384 result = LogicalExpressionGet::Deserialize(deserializer);
416385 break;
416386 case LogicalOperatorType::LOGICAL_EXTENSION_OPERATOR:
416387 result = LogicalExtensionOperator::Deserialize(deserializer);
416388 break;
416389 case LogicalOperatorType::LOGICAL_FILTER:
416390 result = LogicalFilter::Deserialize(deserializer);
416391 break;
416392 case LogicalOperatorType::LOGICAL_GET:
416393 result = LogicalGet::Deserialize(deserializer);
416394 break;
416395 case LogicalOperatorType::LOGICAL_INSERT:
416396 result = LogicalInsert::Deserialize(deserializer);
416397 break;
416398 case LogicalOperatorType::LOGICAL_INTERSECT:
416399 result = LogicalSetOperation::Deserialize(deserializer);
416400 break;
416401 case LogicalOperatorType::LOGICAL_LIMIT:
416402 result = LogicalLimit::Deserialize(deserializer);
416403 break;
416404 case LogicalOperatorType::LOGICAL_LOAD:
416405 result = LogicalSimple::Deserialize(deserializer);
416406 break;
416407 case LogicalOperatorType::LOGICAL_MATERIALIZED_CTE:
416408 result = LogicalMaterializedCTE::Deserialize(deserializer);
416409 break;
416410 case LogicalOperatorType::LOGICAL_MERGE_INTO:
416411 result = LogicalMergeInto::Deserialize(deserializer);
416412 break;
416413 case LogicalOperatorType::LOGICAL_ORDER_BY:
416414 result = LogicalOrder::Deserialize(deserializer);
416415 break;
416416 case LogicalOperatorType::LOGICAL_PIVOT:
416417 result = LogicalPivot::Deserialize(deserializer);
416418 break;
416419 case LogicalOperatorType::LOGICAL_POSITIONAL_JOIN:
416420 result = LogicalPositionalJoin::Deserialize(deserializer);
416421 break;
416422 case LogicalOperatorType::LOGICAL_PROJECTION:
416423 result = LogicalProjection::Deserialize(deserializer);
416424 break;
416425 case LogicalOperatorType::LOGICAL_RECURSIVE_CTE:
416426 result = LogicalRecursiveCTE::Deserialize(deserializer);
416427 break;
416428 case LogicalOperatorType::LOGICAL_RESET:
416429 result = LogicalReset::Deserialize(deserializer);
416430 break;
416431 case LogicalOperatorType::LOGICAL_SAMPLE:
416432 result = LogicalSample::Deserialize(deserializer);
416433 break;
416434 case LogicalOperatorType::LOGICAL_SET:
416435 result = LogicalSet::Deserialize(deserializer);
416436 break;
416437 case LogicalOperatorType::LOGICAL_TOP_N:
416438 result = LogicalTopN::Deserialize(deserializer);
416439 break;
416440 case LogicalOperatorType::LOGICAL_TRANSACTION:
416441 result = LogicalSimple::Deserialize(deserializer);
416442 break;
416443 case LogicalOperatorType::LOGICAL_UNION:
416444 result = LogicalSetOperation::Deserialize(deserializer);
416445 break;
416446 case LogicalOperatorType::LOGICAL_UNNEST:
416447 result = LogicalUnnest::Deserialize(deserializer);
416448 break;
416449 case LogicalOperatorType::LOGICAL_UPDATE:
416450 result = LogicalUpdate::Deserialize(deserializer);
416451 break;
416452 case LogicalOperatorType::LOGICAL_VACUUM:
416453 result = LogicalVacuum::Deserialize(deserializer);
416454 break;
416455 case LogicalOperatorType::LOGICAL_WINDOW:
416456 result = LogicalWindow::Deserialize(deserializer);
416457 break;
416458 default:
416459 throw SerializationException("Unsupported type for deserialization of LogicalOperator!");
416460 }
416461 deserializer.Unset<LogicalOperatorType>();
416462 result->children = std::move(children);
416463 if (type == LogicalOperatorType::LOGICAL_UPDATE) {
416464 LogicalUpdate::RewriteInPlaceUpdates(*result);
416465 }
416466 return result;
416467}

◆ Copy()

unique_ptr< LogicalOperator > duckdb::LogicalOperator::Copy ( ClientContext & context) const
virtual
380684 {
380685 MemoryStream stream(Allocator::Get(context));
380686 SerializationOptions options;
380687 options.serialization_compatibility = SerializationCompatibility::Latest();
380688 BinarySerializer serializer(stream, options);
380689 try {
380690 serializer.Begin();
380691 this->Serialize(serializer);
380692 serializer.End();
380693 } catch (NotImplementedException &ex) {
380694 ErrorData error(ex);
380695 throw NotImplementedException("Logical Operator Copy requires the logical operator and all of its children to "
380696 "be serializable: " +
380697 error.RawMessage());
380698 }
380699 stream.Rewind();
380700 bound_parameter_map_t parameters;
380701 auto op_copy = BinaryDeserializer::Deserialize<LogicalOperator>(stream, context, parameters);
380702 return op_copy;
380703}

◆ RequireOptimizer()

virtual bool duckdb::LogicalOperator::RequireOptimizer ( ) const
inlinevirtual
21300 {
21301 return true;
21302 }

◆ SupportSerialization()

virtual bool duckdb::LogicalOperator::SupportSerialization ( ) const
inlinevirtual

Allows LogicalOperators to opt out of serialization.

Reimplemented in duckdb::LogicalCreateSecret, duckdb::LogicalExecute, duckdb::LogicalExplain, duckdb::LogicalGet, duckdb::LogicalPragma, and duckdb::LogicalPrepare.

21305 {
21306 return true;
21307 };

◆ HasProjectionMap()

virtual bool duckdb::LogicalOperator::HasProjectionMap ( ) const
inlinevirtual
21309 {
21310 return false;
21311 }

◆ GetTableIndex()

◆ ResolveTypes()

◆ Cast() [1/2]

template<class TARGET>
TARGET & duckdb::LogicalOperator::Cast ( )
inline
21322 {
21323 if (TARGET::TYPE != LogicalOperatorType::LOGICAL_INVALID && type != TARGET::TYPE) {
21324 throw InternalException("Failed to cast logical operator to type - logical operator type mismatch");
21325 }
21326 return reinterpret_cast<TARGET &>(*this);
21327 }

◆ Cast() [2/2]

template<class TARGET>
const TARGET & duckdb::LogicalOperator::Cast ( ) const
inline
21330 {
21331 if (TARGET::TYPE != LogicalOperatorType::LOGICAL_INVALID && type != TARGET::TYPE) {
21332 throw InternalException("Failed to cast logical operator to type - logical operator type mismatch");
21333 }
21334 return reinterpret_cast<const TARGET &>(*this);
21335 }

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