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

LogicalVacuum represents a simple logical operator that only passes on the parse info. More...

Inheritance diagram for duckdb::LogicalVacuum:
Collaboration diagram for duckdb::LogicalVacuum:

Public Member Functions

 LogicalVacuum (unique_ptr< VacuumInfo > info)
VacuumInfo & GetInfo ()
TableCatalogEntry & GetTable ()
bool HasTable () const
void SetTable (TableCatalogEntry &table_p)
void Serialize (Serializer &serializer) const override
idx_t EstimateCardinality (ClientContext &context) override
Public Member Functions inherited from duckdb::LogicalOperator
 LogicalOperator (LogicalOperatorType type)
 LogicalOperator (LogicalOperatorType type, vector< unique_ptr< Expression > > expressions)
virtual vector< ColumnBinding > GetColumnBindings ()
virtual idx_t GetRootIndex ()
void PrintColumnBindings ()
void ResolveOperatorTypes ()
 Resolve the types of the logical operator and its children.
virtual string GetName () const
virtual InsertionOrderPreservingMap< string > ParamsToString () const
virtual string ToString (ExplainFormat format=ExplainFormat::DEFAULT) const
DUCKDB_API void Print ()
virtual void Verify (ClientContext &context)
 Debug method: verify that the integrity of expressions & child nodes are maintained.
void AddChild (unique_ptr< LogicalOperator > child)
void SetEstimatedCardinality (idx_t _estimated_cardinality)
void SetParamsEstimatedCardinality (InsertionOrderPreservingMap< string > &result) const
virtual unique_ptr< LogicalOperator > Copy (ClientContext &context) const
virtual bool RequireOptimizer () const
virtual bool SupportSerialization () const
 Allows LogicalOperators to opt out of serialization.
virtual bool HasProjectionMap () const
virtual vector< idx_t > GetTableIndex () const
 Returns the set of table indexes of this operator.
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Static Public Member Functions

static unique_ptr< LogicalOperator > Deserialize (Deserializer &deserializer)
Static Public Member Functions inherited from duckdb::LogicalOperator
static string ColumnBindingsToString (const vector< ColumnBinding > &bindings)
static vector< ColumnBinding > GenerateColumnBindings (idx_t table_idx, idx_t column_count)
static vector< LogicalType > MapTypes (const vector< LogicalType > &types, const vector< idx_t > &projection_map)
static vector< ColumnBinding > MapBindings (const vector< ColumnBinding > &types, const vector< idx_t > &projection_map)
static unique_ptr< LogicalOperator > Deserialize (Deserializer &deserializer)

Public Attributes

optional_ptr< TableCatalogEntry > table
unordered_map< idx_t, idx_t > column_id_map
unique_ptr< VacuumInfo > info
Public Attributes inherited from duckdb::LogicalOperator
LogicalOperatorType type
 The type of the logical operator.
vector< unique_ptr< LogicalOperator > > children
 The set of children of the operator.
vector< unique_ptr< Expression > > expressions
 The set of expressions contained within the operator, if any.
vector< LogicalType > types
 The types returned by this logical operator. Set by calling LogicalOperator::ResolveTypes.
idx_t estimated_cardinality
 Estimated Cardinality.
bool has_estimated_cardinality

Static Public Attributes

static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_VACUUM

Protected Member Functions

void ResolveTypes () override
 Resolve types for this specific operator.

Detailed Description

LogicalVacuum represents a simple logical operator that only passes on the parse info.

Constructor & Destructor Documentation

◆ LogicalVacuum() [1/2]

duckdb::LogicalVacuum::LogicalVacuum ( )
383411 : LogicalOperator(LogicalOperatorType::LOGICAL_VACUUM) {
383412}

◆ LogicalVacuum() [2/2]

duckdb::LogicalVacuum::LogicalVacuum ( unique_ptr< VacuumInfo > info)
explicit
383415 : LogicalOperator(LogicalOperatorType::LOGICAL_VACUUM), info(std::move(info)) {
383416}

Member Function Documentation

◆ GetInfo()

VacuumInfo & duckdb::LogicalVacuum::GetInfo ( )
inline
206436 {
206437 return *info;
206438 }

◆ GetTable()

TableCatalogEntry & duckdb::LogicalVacuum::GetTable ( )
383418 {
383419 D_ASSERT(HasTable());
383420 return *table;
383421}

◆ HasTable()

bool duckdb::LogicalVacuum::HasTable ( ) const
383422 {
383423 return table != nullptr;
383424}

◆ SetTable()

void duckdb::LogicalVacuum::SetTable ( TableCatalogEntry & table_p)
383426 {
383427 table = &table_p;
383428}

◆ Serialize()

void duckdb::LogicalVacuum::Serialize ( Serializer & serializer) const
overridevirtual

Reimplemented from duckdb::LogicalOperator.

383430 {
383431 LogicalOperator::Serialize(serializer);
383432
383433 serializer.WriteProperty(200, "info", info);
383434 serializer.WriteProperty(201, "column_id_map", column_id_map);
383435}

◆ Deserialize()

unique_ptr< LogicalOperator > duckdb::LogicalVacuum::Deserialize ( Deserializer & deserializer)
static
383437 {
383438 auto result = unique_ptr<LogicalVacuum>(new LogicalVacuum());
383439
383440 auto tmp_info = deserializer.ReadPropertyWithDefault<unique_ptr<ParseInfo>>(200, "info");
383441 deserializer.ReadProperty(201, "column_id_map", result->column_id_map);
383442
383443 result->info = unique_ptr_cast<ParseInfo, VacuumInfo>(std::move(tmp_info));
383444 auto &info = *result->info;
383445 if (info.has_table) {
383446 // deserialize the 'table'
383447 auto &context = deserializer.Get<ClientContext &>();
383448 auto binder = Binder::CreateBinder(context);
383449 auto bound_table = binder->Bind(*info.ref);
383450 if (bound_table.plan->type != LogicalOperatorType::LOGICAL_GET) {
383451 throw InvalidInputException("can only vacuum or analyze base tables");
383452 }
383453 auto table_ptr = bound_table.plan->Cast<LogicalGet>().GetTable();
383454 if (!table_ptr) {
383455 throw InvalidInputException("can only vacuum or analyze base tables");
383456 }
383457 auto &table = *table_ptr;
383458 result->SetTable(table);
383459 // FIXME: we should probably verify that the 'column_id_map' and 'columns' are the same on the bound table after
383460 // deserialization?
383461 }
383462 return std::move(result);
383463}

◆ EstimateCardinality()

idx_t duckdb::LogicalVacuum::EstimateCardinality ( ClientContext & context)
overridevirtual

Reimplemented from duckdb::LogicalOperator.

383465 {
383466 return 1;
383467}

◆ ResolveTypes()

void duckdb::LogicalVacuum::ResolveTypes ( )
inlineoverrideprotectedvirtual

Resolve types for this specific operator.

Implements duckdb::LogicalOperator.

206455 {
206456 types.emplace_back(LogicalType::BOOLEAN);
206457 }
vector< LogicalType > types
The types returned by this logical operator. Set by calling LogicalOperator::ResolveTypes.
Definition duckdb.hpp:21266

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