![]() |
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.
|
PhysicalOperator is the base class of the physical operators present in the execution plan. More...
#include <duckdb.hpp>


Public Member Functions | |
| PhysicalOperator (PhysicalPlan &physical_plan, PhysicalOperatorType type, vector< LogicalType > types, idx_t estimated_cardinality) | |
| PhysicalOperator (const PhysicalOperator &other)=delete | |
| Deleted copy constructors. | |
| PhysicalOperator & | operator= (const PhysicalOperator &)=delete |
| virtual string | GetName () const |
| virtual InsertionOrderPreservingMap< string > | ParamsToString () const |
| virtual string | ToString (ExplainFormat format=ExplainFormat::DEFAULT) const |
| void | Print () const |
| virtual vector< const_reference< PhysicalOperator > > | GetChildren () const |
| const vector< LogicalType > & | GetTypes () const |
| Return a vector of the types that will be returned by this operator. | |
| virtual bool | Equals (const PhysicalOperator &other) const |
| idx_t | EstimatedThreadCount () const |
| Functions to help decide how to set up pipeline dependencies. | |
| bool | CanSaturateThreads (ClientContext &context) const |
| virtual void | Verify () |
| virtual unique_ptr< OperatorState > | GetOperatorState (ExecutionContext &context) const |
| virtual unique_ptr< GlobalOperatorState > | GetGlobalOperatorState (ClientContext &context) const |
| virtual OperatorResultType | Execute (ExecutionContext &context, DataChunk &input, DataChunk &chunk, GlobalOperatorState &gstate, OperatorState &state) const |
| virtual OperatorFinalizeResultType | FinalExecute (ExecutionContext &context, DataChunk &chunk, GlobalOperatorState &gstate, OperatorState &state) const |
| virtual OperatorFinalResultType | OperatorFinalize (Pipeline &pipeline, Event &event, ClientContext &context, OperatorFinalizeInput &input) const |
| virtual bool | ParallelOperator () const |
| virtual bool | RequiresFinalExecute () const |
| virtual bool | RequiresOperatorFinalize () const |
| virtual OrderPreservationType | OperatorOrder () const |
| The influence the operator has on order (insertion order means no influence). | |
| virtual unique_ptr< LocalSourceState > | GetLocalSourceState (ExecutionContext &context, GlobalSourceState &gstate) const |
| virtual unique_ptr< GlobalSourceState > | GetGlobalSourceState (ClientContext &context) const |
| SourceResultType | GetData (ExecutionContext &context, DataChunk &chunk, OperatorSourceInput &input) const |
| virtual OperatorPartitionData | GetPartitionData (ExecutionContext &context, DataChunk &chunk, GlobalSourceState &gstate, LocalSourceState &lstate, const OperatorPartitionInfo &partition_info) const |
| virtual bool | IsSource () const |
| virtual bool | ParallelSource () const |
| virtual bool | SupportsPartitioning (const OperatorPartitionInfo &partition_info) const |
| virtual OrderPreservationType | SourceOrder () const |
| The type of order emitted by the operator (as a source). | |
| virtual ProgressData | GetProgress (ClientContext &context, GlobalSourceState &gstate) const |
| Returns the current progress percentage, or a negative value if progress bars are not supported. | |
| virtual ProgressData | GetSinkProgress (ClientContext &context, GlobalSinkState &gstate, const ProgressData source_progress) const |
| Returns the current progress percentage, or a negative value if progress bars are not supported. | |
| virtual InsertionOrderPreservingMap< string > | ExtraSourceParams (GlobalSourceState &gstate, LocalSourceState &lstate) const |
| virtual SinkResultType | Sink (ExecutionContext &context, DataChunk &chunk, OperatorSinkInput &input) const |
| virtual SinkCombineResultType | Combine (ExecutionContext &context, OperatorSinkCombineInput &input) const |
| virtual void | PrepareFinalize (ClientContext &context, GlobalSinkState &sink_state) const |
| virtual SinkFinalizeType | Finalize (Pipeline &pipeline, Event &event, ClientContext &context, OperatorSinkFinalizeInput &input) const |
| virtual SinkNextBatchType | NextBatch (ExecutionContext &context, OperatorSinkNextBatchInput &input) const |
| virtual unique_ptr< LocalSinkState > | GetLocalSinkState (ExecutionContext &context) const |
| virtual unique_ptr< GlobalSinkState > | GetGlobalSinkState (ClientContext &context) const |
| virtual bool | IsSink () const |
| virtual bool | ParallelSink () const |
| virtual OperatorPartitionInfo | RequiredPartitionInfo () const |
| virtual bool | SinkOrderDependent () const |
| virtual vector< const_reference< PhysicalOperator > > | GetSources () const |
| bool | AllSourcesSupportBatchIndex () const |
| virtual void | BuildPipelines (Pipeline ¤t, MetaPipeline &meta_pipeline) |
| template<class TARGET> | |
| TARGET & | Cast () |
| template<class TARGET> | |
| const TARGET & | Cast () const |
Static Public Member Functions | |
| static void | SetEstimatedCardinality (InsertionOrderPreservingMap< string > &result, idx_t estimated_cardinality) |
| static idx_t | GetMaxThreadMemory (ClientContext &context) |
| The maximum amount of memory the operator should use per thread. | |
| static OperatorCachingMode | SelectOperatorCachingMode (ExecutionContext &context) |
| Whether operator caching is allowed in the current execution context. | |
Public Attributes | |
| ArenaLinkedList< reference< PhysicalOperator > > | children |
| The child operators. | |
| PhysicalOperatorType | type |
| The physical operator type. | |
| vector< LogicalType > | types |
| The return types. | |
| idx_t | estimated_cardinality |
| The estimated cardinality. | |
| unique_ptr< GlobalSinkState > | sink_state |
| The global sink state. | |
| unique_ptr< GlobalOperatorState > | op_state |
| The global operator state. | |
| mutex | lock |
| Lock for (re)setting any of the operator states. | |
Static Public Attributes | |
| static constexpr const PhysicalOperatorType | TYPE = PhysicalOperatorType::INVALID |
Protected Member Functions | |
| virtual SourceResultType | GetDataInternal (ExecutionContext &context, DataChunk &chunk, OperatorSourceInput &input) const |
PhysicalOperator is the base class of the physical operators present in the execution plan.
| duckdb::PhysicalOperator::PhysicalOperator | ( | PhysicalPlan & | physical_plan, |
| PhysicalOperatorType | type, | ||
| vector< LogicalType > | types, | ||
| idx_t | estimated_cardinality ) |
|
inlinevirtual |
|
virtual |
|
inlinevirtual |
|
static |
|
virtual |
| void duckdb::PhysicalOperator::Print | ( | ) | const |
|
virtual |
|
inline |
Return a vector of the types that will be returned by this operator.

|
inlinevirtual |
| idx_t duckdb::PhysicalOperator::EstimatedThreadCount | ( | ) | const |
Functions to help decide how to set up pipeline dependencies.
| bool duckdb::PhysicalOperator::CanSaturateThreads | ( | ClientContext & | context | ) | const |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Reimplemented in duckdb::CachingPhysicalOperator.
|
virtual |
Reimplemented in duckdb::CachingPhysicalOperator.
|
virtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
The influence the operator has on order (insertion order means no influence).
Reimplemented in duckdb::PhysicalCrossProduct, duckdb::PhysicalJoin, duckdb::PhysicalStreamingLimit, duckdb::PhysicalStreamingWindow, and duckdb::PhysicalTableInOutFunction.
|
virtual |
|
virtual |
|
protectedvirtual |
Reimplemented in duckdb::PhysicalCreateIndex.
| SourceResultType duckdb::PhysicalOperator::GetData | ( | ExecutionContext & | context, |
| DataChunk & | chunk, | ||
| OperatorSourceInput & | input ) const |
|
virtual |
|
inlinevirtual |
Reimplemented in duckdb::PhysicalHashJoin.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
The type of order emitted by the operator (as a source).
Reimplemented in duckdb::PhysicalDelimJoin, duckdb::PhysicalHashAggregate, duckdb::PhysicalJoin, duckdb::PhysicalOrder, duckdb::PhysicalPerfectHashAggregate, duckdb::PhysicalTableScan, duckdb::PhysicalTopN, and duckdb::PhysicalWindow.

|
virtual |
Returns the current progress percentage, or a negative value if progress bars are not supported.
Reimplemented in duckdb::PhysicalHashAggregate, duckdb::PhysicalHashJoin, duckdb::PhysicalIEJoin, duckdb::PhysicalOrder, duckdb::PhysicalPositionalScan, duckdb::PhysicalTableScan, and duckdb::PhysicalWindow.
|
inlinevirtual |
Returns the current progress percentage, or a negative value if progress bars are not supported.
Reimplemented in duckdb::PhysicalOrder, and duckdb::PhysicalWindow.
|
inlinevirtual |
|
virtual |
The sink method is called constantly with new input, as long as new input is available. Note that this method CAN be called in parallel, proper locking is needed when accessing dat a inside the GlobalSinkState.
Reimplemented in duckdb::PhysicalArrowCollector, duckdb::PhysicalAsOfJoin, duckdb::PhysicalBatchCollector, duckdb::PhysicalBatchCopyToFile, duckdb::PhysicalBatchInsert, duckdb::PhysicalBlockwiseNLJoin, duckdb::PhysicalBufferedBatchCollector, duckdb::PhysicalBufferedCollector, duckdb::PhysicalCopyToFile, duckdb::PhysicalCreateIndex, duckdb::PhysicalCreateType, duckdb::PhysicalCrossProduct, duckdb::PhysicalCTE, duckdb::PhysicalDelete, duckdb::PhysicalExplainAnalyze, duckdb::PhysicalExport, duckdb::PhysicalHashAggregate, duckdb::PhysicalHashJoin, duckdb::PhysicalIEJoin, duckdb::PhysicalInsert, duckdb::PhysicalLeftDelimJoin, duckdb::PhysicalLimit, duckdb::PhysicalLimitPercent, duckdb::PhysicalMaterializedCollector, duckdb::PhysicalMergeInto, duckdb::PhysicalNestedLoopJoin, duckdb::PhysicalOrder, duckdb::PhysicalPartitionedAggregate, duckdb::PhysicalPerfectHashAggregate, duckdb::PhysicalPiecewiseMergeJoin, duckdb::PhysicalPositionalJoin, duckdb::PhysicalRecursiveCTE, duckdb::PhysicalReservoirSample, duckdb::PhysicalRightDelimJoin, duckdb::PhysicalSetVariable, duckdb::PhysicalTopN, duckdb::PhysicalUngroupedAggregate, duckdb::PhysicalUpdate, duckdb::PhysicalVacuum, and duckdb::PhysicalWindow.
|
virtual |
The combine is called when a single thread has completed execution of its part of the pipeline, it is the final time that a specific LocalSinkState is accessible. This method can be called in parallel while other Sink() or Combine() calls are active on the same GlobalSinkState.
Reimplemented in duckdb::PhysicalArrowCollector, duckdb::PhysicalAsOfJoin, duckdb::PhysicalBatchCollector, duckdb::PhysicalBatchCopyToFile, duckdb::PhysicalBatchInsert, duckdb::PhysicalBufferedBatchCollector, duckdb::PhysicalBufferedCollector, duckdb::PhysicalCopyToFile, duckdb::PhysicalCreateIndex, duckdb::PhysicalCTE, duckdb::PhysicalHashAggregate, duckdb::PhysicalHashJoin, duckdb::PhysicalIEJoin, duckdb::PhysicalInsert, duckdb::PhysicalLeftDelimJoin, duckdb::PhysicalLimit, duckdb::PhysicalMaterializedCollector, duckdb::PhysicalMergeInto, duckdb::PhysicalNestedLoopJoin, duckdb::PhysicalOrder, duckdb::PhysicalPartitionedAggregate, duckdb::PhysicalPerfectHashAggregate, duckdb::PhysicalPiecewiseMergeJoin, duckdb::PhysicalReservoirSample, duckdb::PhysicalRightDelimJoin, duckdb::PhysicalTopN, duckdb::PhysicalUngroupedAggregate, duckdb::PhysicalUpdate, duckdb::PhysicalVacuum, and duckdb::PhysicalWindow.
|
virtual |
(optional) function that will be called before Finalize For now, its only use is to to communicate memory usage in multi-join pipelines through TemporaryMemoryManager
Reimplemented in duckdb::PhysicalHashJoin, duckdb::PhysicalLeftDelimJoin, and duckdb::PhysicalRightDelimJoin.
|
virtual |
The finalize is called when ALL threads are finished execution. It is called only once per pipeline, and is entirely single threaded. If Finalize returns SinkResultType::Finished, the sink is marked as finished
Reimplemented in duckdb::PhysicalArrowBatchCollector, duckdb::PhysicalArrowCollector, duckdb::PhysicalAsOfJoin, duckdb::PhysicalBatchCollector, duckdb::PhysicalBatchCopyToFile, duckdb::PhysicalBatchInsert, duckdb::PhysicalBlockwiseNLJoin, duckdb::PhysicalCopyToFile, duckdb::PhysicalCreateIndex, duckdb::PhysicalExplainAnalyze, duckdb::PhysicalHashAggregate, duckdb::PhysicalHashJoin, duckdb::PhysicalIEJoin, duckdb::PhysicalInsert, duckdb::PhysicalLeftDelimJoin, duckdb::PhysicalMergeInto, duckdb::PhysicalNestedLoopJoin, duckdb::PhysicalOrder, duckdb::PhysicalPartitionedAggregate, duckdb::PhysicalPiecewiseMergeJoin, duckdb::PhysicalReservoirSample, duckdb::PhysicalRightDelimJoin, duckdb::PhysicalTopN, duckdb::PhysicalUngroupedAggregate, duckdb::PhysicalVacuum, and duckdb::PhysicalWindow.
|
virtual |
For sinks with RequiresBatchIndex set to true, when a new batch starts being processed this method is called This allows flushing of the current batch (e.g. to disk)
Reimplemented in duckdb::PhysicalBatchCopyToFile, duckdb::PhysicalBatchInsert, duckdb::PhysicalBufferedBatchCollector, and duckdb::PhysicalPartitionedAggregate.
|
virtual |
Reimplemented in duckdb::PhysicalCreateIndex.
|
virtual |
Reimplemented in duckdb::PhysicalCreateIndex.
|
static |
The maximum amount of memory the operator should use per thread.
|
static |
Whether operator caching is allowed in the current execution context.

|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Whether or not the sink operator depends on the order of the input chunks If this is set to true, we cannot do things like caching intermediate vectors
Reimplemented in duckdb::PhysicalArrowCollector, duckdb::PhysicalBufferedCollector, duckdb::PhysicalCopyToFile, duckdb::PhysicalCreateType, duckdb::PhysicalCrossProduct, duckdb::PhysicalCTE, duckdb::PhysicalDelimJoin, duckdb::PhysicalHashAggregate, duckdb::PhysicalInsert, duckdb::PhysicalJoin, duckdb::PhysicalLimit, duckdb::PhysicalLimitPercent, duckdb::PhysicalMaterializedCollector, duckdb::PhysicalOrder, duckdb::PhysicalPerfectHashAggregate, duckdb::PhysicalUngroupedAggregate, and duckdb::PhysicalWindow.
|
virtual |
| bool duckdb::PhysicalOperator::AllSourcesSupportBatchIndex | ( | ) | const |
|
virtual |
|
inline |
|
inline |