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

Public Member Functions

 PhysicalCopyDatabase (PhysicalPlan &physical_plan, vector< LogicalType > types, idx_t estimated_cardinality, unique_ptr< CopyDatabaseInfo > info_p)
SourceResultType GetDataInternal (ExecutionContext &context, DataChunk &chunk, OperatorSourceInput &input) const override
bool IsSource () const 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 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 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 &current, MetaPipeline &meta_pipeline)
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Public Attributes

unique_ptr< CopyDatabaseInfo > info
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::COPY_DATABASE
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.

Constructor & Destructor Documentation

◆ PhysicalCopyDatabase()

duckdb::PhysicalCopyDatabase::PhysicalCopyDatabase ( PhysicalPlan & physical_plan,
vector< LogicalType > types,
idx_t estimated_cardinality,
unique_ptr< CopyDatabaseInfo > info_p )
193775 : PhysicalOperator(physical_plan, PhysicalOperatorType::COPY_DATABASE, std::move(types), estimated_cardinality),
193776 info(std::move(info_p)) {
193777}
vector< LogicalType > types
The return types.
Definition duckdb.hpp:22152
idx_t estimated_cardinality
The estimated cardinality.
Definition duckdb.hpp:22154

◆ ~PhysicalCopyDatabase()

duckdb::PhysicalCopyDatabase::~PhysicalCopyDatabase ( )
override
193779 {
193780}

Member Function Documentation

◆ GetDataInternal()

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

Reimplemented from duckdb::PhysicalOperator.

193786 {
193787 auto &catalog = Catalog::GetCatalog(context.client, info->target_database);
193788 for (auto &create_info : info->entries) {
193789 switch (create_info->type) {
193790 case CatalogType::SCHEMA_ENTRY:
193791 catalog.CreateSchema(context.client, create_info->Cast<CreateSchemaInfo>());
193792 break;
193793 case CatalogType::VIEW_ENTRY:
193794 catalog.CreateView(context.client, create_info->Cast<CreateViewInfo>());
193795 break;
193796 case CatalogType::SEQUENCE_ENTRY:
193797 catalog.CreateSequence(context.client, create_info->Cast<CreateSequenceInfo>());
193798 break;
193799 case CatalogType::TYPE_ENTRY:
193800 catalog.CreateType(context.client, create_info->Cast<CreateTypeInfo>());
193801 break;
193802 case CatalogType::MACRO_ENTRY:
193803 case CatalogType::TABLE_MACRO_ENTRY:
193804 catalog.CreateFunction(context.client, create_info->Cast<CreateMacroInfo>());
193805 break;
193806 case CatalogType::TABLE_ENTRY: {
193807 auto binder = Binder::CreateBinder(context.client);
193808 auto bound_info = binder->BindCreateTableInfo(std::move(create_info));
193809 catalog.CreateTable(context.client, *bound_info);
193810 break;
193811 }
193812 case CatalogType::INDEX_ENTRY: {
193813 // Skip for now.
193814 break;
193815 }
193816 default:
193817 throw NotImplementedException("Entry type %s not supported in PhysicalCopyDatabase",
193818 CatalogTypeToString(create_info->type));
193819 }
193820 }
193821
193822 // Create the indexes after table creation.
193823 for (auto &create_info : info->entries) {
193824 if (!create_info || create_info->type != CatalogType::INDEX_ENTRY) {
193825 continue;
193826 }
193827 catalog.CreateIndex(context.client, create_info->Cast<CreateIndexInfo>());
193828
193829 auto &create_index_info = create_info->Cast<CreateIndexInfo>();
193830 auto &table_entry =
193831 catalog.GetEntry<TableCatalogEntry>(context.client, create_index_info.schema, create_index_info.table);
193832 auto &data_table = table_entry.GetStorage();
193833
193834 IndexStorageInfo storage_info(create_index_info.index_name);
193835 storage_info.options.emplace("v1_0_0_storage", false);
193836 auto unbound_index = make_uniq<UnboundIndex>(create_index_info.Copy(), std::move(storage_info),
193837 data_table.GetTableIOManager(), catalog.GetAttached());
193838 data_table.AddIndex(std::move(unbound_index));
193839
193840 // We add unbound indexes, so we immediately bind them.
193841 // Otherwise, WAL serialization fails due to unbound indexes.
193842 auto &data_table_info = *data_table.GetDataTableInfo();
193843 data_table_info.BindIndexes(context.client);
193844 }
193845
193846 return SourceResultType::FINISHED;
193847}
static DUCKDB_API Catalog & GetCatalog(ClientContext &context, const string &catalog_name)
Get the specified Catalog from the ClientContext.
Definition duckdb.cpp:7211

◆ IsSource()

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

Reimplemented from duckdb::PhysicalOperator.

193749 {
193750 return true;
193751 }

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