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

The PhysicalColumnDataScan scans a ColumnDataCollection. More...

Inheritance diagram for duckdb::PhysicalColumnDataScan:
Collaboration diagram for duckdb::PhysicalColumnDataScan:

Public Member Functions

 PhysicalColumnDataScan (PhysicalPlan &physical_plan, vector< LogicalType > types, PhysicalOperatorType op_type, idx_t estimated_cardinality, optionally_owned_ptr< ColumnDataCollection > collection)
 PhysicalColumnDataScan (PhysicalPlan &physical_plan, vector< LogicalType > types, PhysicalOperatorType op_type, idx_t estimated_cardinality, idx_t cte_index)
unique_ptr< GlobalSourceState > GetGlobalSourceState (ClientContext &context) const override
unique_ptr< LocalSourceState > GetLocalSourceState (ExecutionContext &context, GlobalSourceState &gstate) const override
SourceResultType GetDataInternal (ExecutionContext &context, DataChunk &chunk, OperatorSourceInput &input) const override
bool IsSource () const override
InsertionOrderPreservingMap< string > ParamsToString () const override
bool ParallelSource () const override
void BuildPipelines (Pipeline &current, MetaPipeline &meta_pipeline) override
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.
PhysicalOperator & operator= (const PhysicalOperator &)=delete
virtual string GetName () 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).
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 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
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Public Attributes

optionally_owned_ptr< ColumnDataCollection > collection
 (optionally owned) column data collection to scan
idx_t cte_index
optional_idx delim_index
Public Attributes inherited from duckdb::PhysicalOperator
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
Static Public Attributes inherited from duckdb::PhysicalOperator
static constexpr const PhysicalOperatorType TYPE = PhysicalOperatorType::INVALID

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

Constructor & Destructor Documentation

◆ PhysicalColumnDataScan() [1/2]

duckdb::PhysicalColumnDataScan::PhysicalColumnDataScan ( PhysicalPlan & physical_plan,
vector< LogicalType > types,
PhysicalOperatorType op_type,
idx_t estimated_cardinality,
optionally_owned_ptr< ColumnDataCollection > collection )
198163 : PhysicalOperator(physical_plan, op_type, std::move(types), estimated_cardinality),
198164 collection(std::move(collection_p)), cte_index(DConstants::INVALID_INDEX) {
198165}
optionally_owned_ptr< ColumnDataCollection > collection
(optionally owned) column data collection to scan
Definition duckdb.cpp:187884
vector< LogicalType > types
The return types.
Definition duckdb.hpp:22152
idx_t estimated_cardinality
The estimated cardinality.
Definition duckdb.hpp:22154
static constexpr const idx_t INVALID_INDEX
The value used to signify an invalid index entry.
Definition duckdb.hpp:1117

◆ PhysicalColumnDataScan() [2/2]

duckdb::PhysicalColumnDataScan::PhysicalColumnDataScan ( PhysicalPlan & physical_plan,
vector< LogicalType > types,
PhysicalOperatorType op_type,
idx_t estimated_cardinality,
idx_t cte_index )
198170 : PhysicalOperator(physical_plan, op_type, std::move(types), estimated_cardinality), collection(nullptr),
198171 cte_index(cte_index) {
198172}

Member Function Documentation

◆ GetGlobalSourceState()

unique_ptr< GlobalSourceState > duckdb::PhysicalColumnDataScan::GetGlobalSourceState ( ClientContext & context) const
overridevirtual

Reimplemented from duckdb::PhysicalOperator.

198196 {
198197 return make_uniq<PhysicalColumnDataGlobalScanState>(*collection);
198198}

◆ GetLocalSourceState()

unique_ptr< LocalSourceState > duckdb::PhysicalColumnDataScan::GetLocalSourceState ( ExecutionContext & context,
GlobalSourceState & gstate ) const
overridevirtual

Reimplemented from duckdb::PhysicalOperator.

198201 {
198202 return make_uniq<PhysicalColumnDataLocalScanState>();
198203}

◆ GetDataInternal()

SourceResultType duckdb::PhysicalColumnDataScan::GetDataInternal ( ExecutionContext & context,
DataChunk & chunk,
OperatorSourceInput & input ) const
overridevirtual

Reimplemented from duckdb::PhysicalOperator.

198206 {
198207 auto &gstate = input.global_state.Cast<PhysicalColumnDataGlobalScanState>();
198208 auto &lstate = input.local_state.Cast<PhysicalColumnDataLocalScanState>();
198209 collection->Scan(gstate.global_scan_state, lstate.local_scan_state, chunk);
198210 return chunk.size() == 0 ? SourceResultType::FINISHED : SourceResultType::HAVE_MORE_OUTPUT;
198211}

◆ IsSource()

bool duckdb::PhysicalColumnDataScan::IsSource ( ) const
inlineoverridevirtual

Reimplemented from duckdb::PhysicalOperator.

187896 {
187897 return true;
187898 }

◆ ParamsToString()

InsertionOrderPreservingMap< string > duckdb::PhysicalColumnDataScan::ParamsToString ( ) const
overridevirtual

Reimplemented from duckdb::PhysicalOperator.

198262 {
198263 InsertionOrderPreservingMap<string> result;
198264 switch (type) {
198265 case PhysicalOperatorType::DELIM_SCAN:
198266 if (delim_index.IsValid()) {
198267 result["Delim Index"] = StringUtil::Format("%llu", delim_index.GetIndex());
198268 }
198269 break;
198270 case PhysicalOperatorType::RECURSIVE_RECURRING_CTE_SCAN:
198271 case PhysicalOperatorType::CTE_SCAN:
198272 case PhysicalOperatorType::RECURSIVE_CTE_SCAN: {
198273 result["CTE Index"] = StringUtil::Format("%llu", cte_index);
198274 break;
198275 }
198276 default:
198277 break;
198278 }
198279 SetEstimatedCardinality(result, estimated_cardinality);
198280 return result;
198281}
PhysicalOperatorType type
The physical operator type.
Definition duckdb.hpp:22150
static string Format(const string fmt_str, ARGS... params)
Format a string using printf semantics.
Definition duckdb.hpp:4002

◆ ParallelSource()

bool duckdb::PhysicalColumnDataScan::ParallelSource ( ) const
inlineoverridevirtual

Reimplemented from duckdb::PhysicalOperator.

187901 {
187902 return true;
187903 }

◆ BuildPipelines()

void duckdb::PhysicalColumnDataScan::BuildPipelines ( Pipeline & current,
MetaPipeline & meta_pipeline )
overridevirtual

Reimplemented from duckdb::PhysicalOperator.

198216 {
198217 // check if there is any additional action we need to do depending on the type
198218 auto &state = meta_pipeline.GetState();
198219 switch (type) {
198220 case PhysicalOperatorType::DELIM_SCAN: {
198221 auto entry = state.delim_join_dependencies.find(*this);
198222 D_ASSERT(entry != state.delim_join_dependencies.end());
198223 // this chunk scan introduces a dependency to the current pipeline
198224 // namely a dependency on the duplicate elimination pipeline to finish
198225 auto delim_dependency = entry->second.get().shared_from_this();
198226 auto delim_sink = state.GetPipelineSink(*delim_dependency);
198227 D_ASSERT(delim_sink);
198228 D_ASSERT(delim_sink->type == PhysicalOperatorType::LEFT_DELIM_JOIN ||
198229 delim_sink->type == PhysicalOperatorType::RIGHT_DELIM_JOIN);
198230 auto &delim_join = delim_sink->Cast<PhysicalDelimJoin>();
198231 current.AddDependency(delim_dependency);
198232 state.SetPipelineSource(current, delim_join.distinct.Cast<PhysicalOperator>());
198233 return;
198234 }
198235 case PhysicalOperatorType::CTE_SCAN: {
198236 auto entry = state.cte_dependencies.find(*this);
198237 D_ASSERT(entry != state.cte_dependencies.end());
198238 // this chunk scan introduces a dependency to the current pipeline
198239 // namely a dependency on the CTE pipeline to finish
198240 auto cte_dependency = entry->second.get().shared_from_this();
198241 auto cte_sink = state.GetPipelineSink(*cte_dependency);
198242 (void)cte_sink;
198243 D_ASSERT(cte_sink);
198244 D_ASSERT(cte_sink->type == PhysicalOperatorType::CTE);
198245 current.AddDependency(cte_dependency);
198246 state.SetPipelineSource(current, *this);
198247 return;
198248 }
198249 case PhysicalOperatorType::RECURSIVE_RECURRING_CTE_SCAN:
198250 case PhysicalOperatorType::RECURSIVE_CTE_SCAN:
198251 if (!meta_pipeline.HasRecursiveCTE()) {
198252 throw InternalException("Recursive CTE scan found without recursive CTE node");
198253 }
198254 break;
198255 default:
198256 break;
198257 }
198258 D_ASSERT(children.empty());
198259 state.SetPipelineSource(current, *this);
198260}
ArenaLinkedList< reference< PhysicalOperator > > children
The child operators.
Definition duckdb.hpp:22148

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