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

MetaPipeline represents a set of pipelines that all have the same sink. More...

Inheritance diagram for duckdb::MetaPipeline:
Collaboration diagram for duckdb::MetaPipeline:

Public Member Functions

 MetaPipeline (Executor &executor, PipelineBuildState &state, optional_ptr< PhysicalOperator > sink, MetaPipelineType type=MetaPipelineType::REGULAR)
 Create a MetaPipeline with the given sink.
 
ExecutorGetExecutor () const
 Get the Executor for this MetaPipeline.
 
PipelineBuildStateGetState () const
 Get the PipelineBuildState for this MetaPipeline.
 
optional_ptr< PhysicalOperatorGetSink () const
 Get the sink operator for this MetaPipeline.
 
optional_ptr< PipelineGetParent () const
 Get the parent pipeline.
 
shared_ptr< Pipeline > & GetBasePipeline ()
 Get the initial pipeline of this MetaPipeline.
 
void GetPipelines (vector< shared_ptr< Pipeline > > &result, bool recursive)
 Get the pipelines of this MetaPipeline.
 
void GetMetaPipelines (vector< shared_ptr< MetaPipeline > > &result, bool recursive, bool skip)
 Get the MetaPipeline children of this MetaPipeline.
 
MetaPipelineGetLastChild ()
 Recursively gets the last child added.
 
const reference_map_t< Pipeline, vector< reference< Pipeline > > > & GetDependencies () const
 Get the dependencies of the Pipelines of this MetaPipeline.
 
MetaPipelineType Type () const
 Whether the sink of this pipeline is a join build.
 
bool HasRecursiveCTE () const
 Whether this MetaPipeline has a recursive CTE.
 
void SetRecursiveCTE ()
 Set the flag that this MetaPipeline is a recursive CTE pipeline.
 
void AssignNextBatchIndex (Pipeline &pipeline)
 Assign a batch index to the given pipeline.
 
vector< shared_ptr< Pipeline > > AddDependenciesFrom (Pipeline &dependant, const Pipeline &start, bool including)
 
void AddRecursiveDependencies (const vector< shared_ptr< Pipeline > > &new_dependencies, const MetaPipeline &last_child)
 Recursively makes all children of this MetaPipeline depend on the given Pipeline.
 
void AddFinishEvent (Pipeline &pipeline)
 Make sure that the given pipeline has its own PipelineFinishEvent (e.g., for IEJoin - double Finalize)
 
bool HasFinishEvent (Pipeline &pipeline) const
 Whether the pipeline needs its own PipelineFinishEvent.
 
optional_ptr< PipelineGetFinishGroup (Pipeline &pipeline) const
 Whether this pipeline is part of a PipelineFinishEvent.
 
void Build (PhysicalOperator &op)
 Build the MetaPipeline with 'op' as the first operator (excl. the shared sink)
 
void Ready () const
 Ready all the pipelines (recursively)
 
PipelineCreatePipeline ()
 Create an empty pipeline within this MetaPipeline.
 
PipelineCreateUnionPipeline (Pipeline &current, bool order_matters)
 Create a union pipeline (clone of 'current')
 
void CreateChildPipeline (Pipeline &current, PhysicalOperator &op, Pipeline &last_pipeline)
 
MetaPipelineCreateChildMetaPipeline (Pipeline &current, PhysicalOperator &op, MetaPipelineType type=MetaPipelineType::REGULAR)
 Create a MetaPipeline child that 'current' depends on.
 
- Public Member Functions inherited from duckdb::enable_shared_from_this< MetaPipeline >
shared_ptr< MetaPipelineshared_from_this ()
 
shared_ptr< MetaPipeline constshared_from_this () const
 

Private Attributes

Executorexecutor
 The executor for all MetaPipelines in the query plan.
 
PipelineBuildStatestate
 The PipelineBuildState for all MetaPipelines in the query plan.
 
optional_ptr< Pipelineparent
 Parent pipeline (optional)
 
optional_ptr< PhysicalOperatorsink
 The sink of all pipelines within this MetaPipeline.
 
MetaPipelineType type
 The type of this MetaPipeline (regular, join build)
 
bool recursive_cte
 Whether this MetaPipeline is a the recursive pipeline of a recursive CTE.
 
vector< shared_ptr< Pipeline > > pipelines
 All pipelines with a different source, but the same sink.
 
reference_map_t< Pipeline, vector< reference< Pipeline > > > pipeline_dependencies
 Dependencies of Pipelines of this MetaPipeline.
 
vector< shared_ptr< MetaPipeline > > children
 Other MetaPipelines that this MetaPipeline depends on.
 
idx_t next_batch_index
 Next batch index.
 
reference_set_t< Pipelinefinish_pipelines
 Pipelines (other than the base pipeline) that need their own PipelineFinishEvent (e.g., for IEJoin)
 
reference_map_t< Pipeline, Pipeline & > finish_map
 Mapping from pipeline (e.g., child or union) to finish pipeline.
 

Additional Inherited Members

- Protected Member Functions inherited from duckdb::enable_shared_from_this< MetaPipeline >
 enable_shared_from_this (enable_shared_from_this const &) noexcept
 
enable_shared_from_thisoperator= (enable_shared_from_this const &) noexcept
 

Detailed Description

MetaPipeline represents a set of pipelines that all have the same sink.

Constructor & Destructor Documentation

◆ MetaPipeline()

duckdb::MetaPipeline::MetaPipeline ( Executor executor,
PipelineBuildState state,
optional_ptr< PhysicalOperator sink,
MetaPipelineType  type = MetaPipelineType::REGULAR 
)

Create a MetaPipeline with the given sink.

We follow these rules when building:

  1. For joins, build out the blocking side before going down the probe side
    • The current streaming pipeline will have a dependency on it (dependency across MetaPipelines)
    • Unions of this streaming pipeline will automatically inherit this dependency
  2. Build child pipelines last (e.g., Hash Join becomes source after probe is done: scan HT for FULL OUTER JOIN)
    • 'last' means after building out all other pipelines associated with this operator
    • The child pipeline automatically has dependencies (within this MetaPipeline) on:
      • The 'current' streaming pipeline
      • And all pipelines that were added to the MetaPipeline after 'current'

Member Function Documentation

◆ AddDependenciesFrom()

vector< shared_ptr< Pipeline > > duckdb::MetaPipeline::AddDependenciesFrom ( Pipeline dependant,
const Pipeline start,
bool  including 
)

Let 'dependant' depend on all pipeline that were created since 'start', where 'including' determines whether 'start' is added to the dependencies

◆ CreateChildPipeline()

void duckdb::MetaPipeline::CreateChildPipeline ( Pipeline current,
PhysicalOperator op,
Pipeline last_pipeline 
)

Create a child pipeline op 'current' starting at 'op', where 'last_pipeline' is the last pipeline added before building out 'current'


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