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

#include <duckdb.hpp>

Inheritance diagram for duckdb::CachingPhysicalOperator:
Collaboration diagram for duckdb::CachingPhysicalOperator:

Public Member Functions

 CachingPhysicalOperator (PhysicalPlan &physical_plan, PhysicalOperatorType type, vector< LogicalType > types, idx_t estimated_cardinality)
 
OperatorResultType Execute (ExecutionContext &context, DataChunk &input, DataChunk &chunk, GlobalOperatorState &gstate, OperatorState &state) const final
 
OperatorFinalizeResultType FinalExecute (ExecutionContext &context, DataChunk &chunk, GlobalOperatorState &gstate, OperatorState &state) const final
 
bool RequiresFinalExecute () const final
 
- Public Member Functions inherited from duckdb::PhysicalOperator
 PhysicalOperator (PhysicalPlan &physical_plan, PhysicalOperatorType type, vector< LogicalType > types, idx_t estimated_cardinality)
 
 PhysicalOperator (const PhysicalOperator &other)=delete
 Deleted copy constructors.
 
PhysicalOperatoroperator= (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< OperatorStateGetOperatorState (ExecutionContext &context) const
 
virtual unique_ptr< GlobalOperatorStateGetGlobalOperatorState (ClientContext &context) const
 
virtual OperatorFinalResultType OperatorFinalize (Pipeline &pipeline, Event &event, ClientContext &context, OperatorFinalizeInput &input) const
 
virtual bool ParallelOperator () const
 
virtual bool RequiresOperatorFinalize () const
 
virtual OrderPreservationType OperatorOrder () const
 The influence the operator has on order (insertion order means no influence)
 
virtual unique_ptr< LocalSourceStateGetLocalSourceState (ExecutionContext &context, GlobalSourceState &gstate) const
 
virtual unique_ptr< GlobalSourceStateGetGlobalSourceState (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< LocalSinkStateGetLocalSinkState (ExecutionContext &context) const
 
virtual unique_ptr< GlobalSinkStateGetGlobalSinkState (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 &current, MetaPipeline &meta_pipeline)
 
template<class TARGET >
TARGETCast ()
 
template<class TARGET >
const TARGETCast () const
 

Public Attributes

bool caching_supported
 
- Public Attributes inherited from duckdb::PhysicalOperator
ArenaLinkedList< reference< PhysicalOperator > > children
 The child operators.
 
PhysicalOperatorType type
 The physical operator type.
 
vector< LogicalTypetypes
 The return types.
 
idx_t estimated_cardinality
 The estimated cardinality.
 
unique_ptr< GlobalSinkStatesink_state
 The global sink state.
 
unique_ptr< GlobalOperatorStateop_state
 The global operator state.
 
mutex lock
 Lock for (re)setting any of the operator states.
 

Static Public Attributes

static constexpr const idx_t CACHE_THRESHOLD = 64
 
- Static Public Attributes inherited from duckdb::PhysicalOperator
static constexpr const PhysicalOperatorType TYPE = PhysicalOperatorType::INVALID
 

Protected Member Functions

virtual OperatorResultType ExecuteInternal (ExecutionContext &context, DataChunk &input, DataChunk &chunk, GlobalOperatorState &gstate, OperatorState &state) const =0
 Child classes need to implement the ExecuteInternal method instead of the Execute.
 
- Protected Member Functions inherited from duckdb::PhysicalOperator
virtual SourceResultType GetDataInternal (ExecutionContext &context, DataChunk &chunk, OperatorSourceInput &input) const
 

Private Member Functions

bool CanCacheType (const LogicalType &type)
 

Additional Inherited Members

- Static Public Member Functions inherited from duckdb::PhysicalOperator
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.
 

Detailed Description

Base class that caches output from child Operator class. Note that Operators inheriting from this class should also inherit their state class from the CachingOperatorState.

Member Function Documentation

◆ Execute()

OperatorResultType duckdb::CachingPhysicalOperator::Execute ( ExecutionContext context,
DataChunk input,
DataChunk chunk,
GlobalOperatorState gstate,
OperatorState state 
) const
finalvirtual

This Execute will prevent small chunks from entering the pipeline, buffering them until a bigger chunk is created.

Reimplemented from duckdb::PhysicalOperator.

◆ FinalExecute()

OperatorFinalizeResultType duckdb::CachingPhysicalOperator::FinalExecute ( ExecutionContext context,
DataChunk chunk,
GlobalOperatorState gstate,
OperatorState state 
) const
finalvirtual

FinalExecute is used here to send out the remainder of the chunk (< STANDARD_VECTOR_SIZE) that we still had cached.

Reimplemented from duckdb::PhysicalOperator.

◆ RequiresFinalExecute()

bool duckdb::CachingPhysicalOperator::RequiresFinalExecute ( ) const
inlinefinalvirtual

Reimplemented from duckdb::PhysicalOperator.

22379 {
22380 return caching_supported;
22381 }

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