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

The physical plan generator generates a physical execution plan from a logical query plan. More...

#include <duckdb.hpp>

Collaboration diagram for duckdb::PhysicalPlanGenerator:

Public Member Functions

 PhysicalPlanGenerator (ClientContext &context)
 
unique_ptr< PhysicalPlanPlan (unique_ptr< LogicalOperator > logical)
 
PhysicalOperatorCreatePlan (LogicalOperator &op)
 
template<class T , class... ARGS>
PhysicalOperatorMake (ARGS &&... args)
 Make a physical operator in the physical plan.
 
ArenaAllocatorArenaRef ()
 
PhysicalOperatorResolveDefaultsProjection (LogicalInsert &op, PhysicalOperator &child)
 

Static Public Member Functions

static bool UseBatchIndex (ClientContext &context, PhysicalOperator &plan)
 Whether or not we can (or should) use a batch-index based operator for executing the given sink.
 
static bool PreserveInsertionOrder (ClientContext &context, PhysicalOperator &plan)
 Whether or not we should preserve insertion order for executing the given sink.
 
static OrderPreservationType OrderPreservationRecursive (PhysicalOperator &op)
 The order preservation type of the given operator decided by recursively looking at its children.
 

Public Attributes

LogicalDependencyList dependencies
 
unordered_map< idx_t, shared_ptr< ColumnDataCollection > > recursive_cte_tables
 
unordered_map< idx_t, shared_ptr< ColumnDataCollection > > recurring_cte_tables
 Used to reference the recurring tables.
 
unordered_map< idx_t, vector< const_reference< PhysicalOperator > > > materialized_ctes
 Materialized CTE ids must be collected.
 
idx_t delim_index = 0
 The index for duplicate eliminated joins.
 

Protected Member Functions

PhysicalOperatorCreatePlan (LogicalAggregate &op)
 
PhysicalOperatorCreatePlan (LogicalAnyJoin &op)
 
PhysicalOperatorCreatePlan (LogicalColumnDataGet &op)
 
PhysicalOperatorCreatePlan (LogicalComparisonJoin &op)
 
PhysicalOperatorCreatePlan (LogicalCopyDatabase &op)
 
PhysicalOperatorCreatePlan (LogicalCreate &op)
 
PhysicalOperatorCreatePlan (LogicalCreateTable &op)
 
PhysicalOperatorCreatePlan (LogicalCreateIndex &op)
 
PhysicalOperatorCreatePlan (LogicalCreateSecret &op)
 
PhysicalOperatorCreatePlan (LogicalCrossProduct &op)
 
PhysicalOperatorCreatePlan (LogicalDelete &op)
 
PhysicalOperatorCreatePlan (LogicalDelimGet &op)
 
PhysicalOperatorCreatePlan (LogicalDistinct &op)
 
PhysicalOperatorCreatePlan (LogicalDummyScan &expr)
 
PhysicalOperatorCreatePlan (LogicalEmptyResult &op)
 
PhysicalOperatorCreatePlan (LogicalExpressionGet &op)
 
PhysicalOperatorCreatePlan (LogicalExport &op)
 
PhysicalOperatorCreatePlan (LogicalFilter &op)
 
PhysicalOperatorCreatePlan (LogicalGet &op)
 
PhysicalOperatorCreatePlan (LogicalLimit &op)
 
PhysicalOperatorCreatePlan (LogicalMergeInto &op)
 
PhysicalOperatorCreatePlan (LogicalOrder &op)
 
PhysicalOperatorCreatePlan (LogicalTopN &op)
 
PhysicalOperatorCreatePlan (LogicalPositionalJoin &op)
 
PhysicalOperatorCreatePlan (LogicalProjection &op)
 
PhysicalOperatorCreatePlan (LogicalInsert &op)
 
PhysicalOperatorCreatePlan (LogicalCopyToFile &op)
 
PhysicalOperatorCreatePlan (LogicalExplain &op)
 
PhysicalOperatorCreatePlan (LogicalSetOperation &op)
 
PhysicalOperatorCreatePlan (LogicalUpdate &op)
 
PhysicalOperatorCreatePlan (LogicalPrepare &expr)
 
PhysicalOperatorCreatePlan (LogicalWindow &expr)
 
PhysicalOperatorCreatePlan (LogicalExecute &op)
 
PhysicalOperatorCreatePlan (LogicalPragma &op)
 
PhysicalOperatorCreatePlan (LogicalSample &op)
 
PhysicalOperatorCreatePlan (LogicalSet &op)
 
PhysicalOperatorCreatePlan (LogicalReset &op)
 
PhysicalOperatorCreatePlan (LogicalSimple &op)
 
PhysicalOperatorCreatePlan (LogicalVacuum &op)
 
PhysicalOperatorCreatePlan (LogicalUnnest &op)
 
PhysicalOperatorCreatePlan (LogicalRecursiveCTE &op)
 
PhysicalOperatorCreatePlan (LogicalMaterializedCTE &op)
 
PhysicalOperatorCreatePlan (LogicalCTERef &op)
 
PhysicalOperatorCreatePlan (LogicalPivot &op)
 
PhysicalOperatorPlanAsOfJoin (LogicalComparisonJoin &op)
 
PhysicalOperatorPlanComparisonJoin (LogicalComparisonJoin &op)
 
PhysicalOperatorPlanDelimJoin (LogicalComparisonJoin &op)
 
PhysicalOperatorExtractAggregateExpressions (PhysicalOperator &child, vector< unique_ptr< Expression > > &expressions, vector< unique_ptr< Expression > > &groups, optional_ptr< vector< GroupingSet > > grouping_sets)
 

Private Member Functions

PhysicalOperatorResolveAndPlan (unique_ptr< LogicalOperator > logical)
 
unique_ptr< PhysicalPlanPlanInternal (LogicalOperator &logical)
 
bool PreserveInsertionOrder (PhysicalOperator &plan)
 
bool UseBatchIndex (PhysicalOperator &plan)
 
optional_ptr< PhysicalOperatorPlanAsOfLoopJoin (LogicalComparisonJoin &op, PhysicalOperator &probe, PhysicalOperator &build)
 

Private Attributes

ClientContextcontext
 
unique_ptr< PhysicalPlanphysical_plan
 

Detailed Description

The physical plan generator generates a physical execution plan from a logical query plan.

Member Function Documentation

◆ Plan()

unique_ptr< PhysicalPlan > duckdb::PhysicalPlanGenerator::Plan ( unique_ptr< LogicalOperator logical)

Creates and returns the physical plan from the logical operator. Performs a verification pass.

◆ Make()

template<class T , class... ARGS>
PhysicalOperator & duckdb::PhysicalPlanGenerator::Make ( ARGS &&...  args)
inline

Make a physical operator in the physical plan.

38182 {
38183 return physical_plan->Make<T>(std::forward<ARGS>(args)...);
38184 }

◆ ArenaRef()

ArenaAllocator & duckdb::PhysicalPlanGenerator::ArenaRef ( )

Get a reference to the ArenaAllocator of the underlying physical plan. Creates a new (empty) physical plan if none exists yet.

Member Data Documentation

◆ recursive_cte_tables

unordered_map<idx_t, shared_ptr<ColumnDataCollection> > duckdb::PhysicalPlanGenerator::recursive_cte_tables

Recursive CTEs require at least one ChunkScan, referencing the working_table. This data structure is used to establish it.


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