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::PhysicalArrowBatchCollector Class Reference
Inheritance diagram for duckdb::PhysicalArrowBatchCollector:
Collaboration diagram for duckdb::PhysicalArrowBatchCollector:

Public Member Functions

 PhysicalArrowBatchCollector (PhysicalPlan &physical_plan, PreparedStatementData &data, idx_t batch_size)
 
SinkFinalizeType Finalize (Pipeline &pipeline, Event &event, ClientContext &context, OperatorSinkFinalizeInput &input) const override
 
unique_ptr< GlobalSinkStateGetGlobalSinkState (ClientContext &context) const override
 
- Public Member Functions inherited from duckdb::PhysicalBatchCollector
 PhysicalBatchCollector (PhysicalPlan &physical_plan, PreparedStatementData &data)
 
unique_ptr< QueryResultGetResult (GlobalSinkState &state) const override
 The final method used to fetch the query result from this operator.
 
SinkResultType Sink (ExecutionContext &context, DataChunk &chunk, OperatorSinkInput &input) const override
 
SinkCombineResultType Combine (ExecutionContext &context, OperatorSinkCombineInput &input) const override
 
SinkFinalizeType Finalize (Pipeline &pipeline, Event &event, ClientContext &context, OperatorSinkFinalizeInput &input) const override
 
unique_ptr< LocalSinkStateGetLocalSinkState (ExecutionContext &context) const override
 
unique_ptr< GlobalSinkStateGetGlobalSinkState (ClientContext &context) const override
 
OperatorPartitionInfo RequiredPartitionInfo () const override
 
bool ParallelSink () const override
 
- Public Member Functions inherited from duckdb::PhysicalResultCollector
 PhysicalResultCollector (PhysicalPlan &physical_plan, PreparedStatementData &data)
 
bool IsSink () const override
 
vector< const_reference< PhysicalOperator > > GetChildren () const override
 
void BuildPipelines (Pipeline &current, MetaPipeline &meta_pipeline) override
 
bool IsSource () const override
 
virtual bool IsStreaming () const
 Whether this is a streaming result collector.
 
- 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
 
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 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< 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 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 void PrepareFinalize (ClientContext &context, GlobalSinkState &sink_state) const
 
virtual SinkNextBatchType NextBatch (ExecutionContext &context, OperatorSinkNextBatchInput &input) const
 
virtual bool SinkOrderDependent () const
 
virtual vector< const_reference< PhysicalOperator > > GetSources () const
 
bool AllSourcesSupportBatchIndex () const
 
template<class TARGET >
TARGETCast ()
 
template<class TARGET >
const TARGETCast () const
 

Public Attributes

idx_t record_batch_size
 User provided batch size.
 
- Public Attributes inherited from duckdb::PhysicalResultCollector
StatementType statement_type
 
StatementProperties properties
 
QueryResultMemoryType memory_type
 
PhysicalOperatorplan
 
vector< string > names
 
- 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.
 

Additional Inherited Members

- Static Public Member Functions inherited from duckdb::PhysicalResultCollector
static unique_ptr< PhysicalOperatorGetResultCollector (ClientContext &context, PreparedStatementData &data)
 
- 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.
 
- Static Public Attributes inherited from duckdb::PhysicalResultCollector
static constexpr const PhysicalOperatorType TYPE = PhysicalOperatorType::RESULT_COLLECTOR
 
- Static Public Attributes inherited from duckdb::PhysicalOperator
static constexpr const PhysicalOperatorType TYPE = PhysicalOperatorType::INVALID
 
- Protected Member Functions inherited from duckdb::PhysicalResultCollector
unique_ptr< ColumnDataCollectionCreateCollection (ClientContext &context) const
 
- Protected Member Functions inherited from duckdb::PhysicalOperator
virtual SourceResultType GetDataInternal (ExecutionContext &context, DataChunk &chunk, OperatorSourceInput &input) const
 

Constructor & Destructor Documentation

◆ PhysicalArrowBatchCollector()

duckdb::PhysicalArrowBatchCollector::PhysicalArrowBatchCollector ( PhysicalPlan physical_plan,
PreparedStatementData data,
idx_t  batch_size 
)
inline
46010 : PhysicalBatchCollector(physical_plan, data), record_batch_size(batch_size) {
46011 }
idx_t record_batch_size
User provided batch size.
Definition duckdb.cpp:46020

Member Function Documentation

◆ Finalize()

SinkFinalizeType duckdb::PhysicalArrowBatchCollector::Finalize ( Pipeline pipeline,
Event event,
ClientContext context,
OperatorSinkFinalizeInput input 
) const
overridevirtual

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 from duckdb::PhysicalOperator.

46102 {
46103 auto &gstate = input.global_state.Cast<ArrowBatchGlobalState>();
46104
46105 auto total_tuple_count = gstate.data.Count();
46106 if (total_tuple_count == 0) {
46107 // Create the result containing a single empty result conversion
46108 gstate.result = make_uniq<ArrowQueryResult>(statement_type, properties, names, types,
46109 context.GetClientProperties(), record_batch_size);
46110 return SinkFinalizeType::READY;
46111 }
46112
46113 // Already create the final query result
46114 gstate.result = make_uniq<ArrowQueryResult>(statement_type, properties, names, types, context.GetClientProperties(),
46116 // Spawn an event that will populate the conversion result
46117 auto &arrow_result = gstate.result->Cast<ArrowQueryResult>();
46118 auto new_event = make_shared_ptr<ArrowMergeEvent>(arrow_result, gstate.data, pipeline);
46119 event.InsertEvent(std::move(new_event));
46120
46121 return SinkFinalizeType::READY;
46122}
vector< LogicalType > types
The return types.
Definition duckdb.hpp:22152

◆ GetGlobalSinkState()

unique_ptr< GlobalSinkState > duckdb::PhysicalArrowBatchCollector::GetGlobalSinkState ( ClientContext context) const
overridevirtual

Reimplemented from duckdb::PhysicalOperator.

46097 {
46098 return make_uniq<ArrowBatchGlobalState>(context, *this);
46099}

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