mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends
m::Operator Struct Referenceabstract

An Operator represents an operation in a query plan. More...

#include <Operator.hpp>

Inheritance diagram for m::Operator:
[legend]
Collaboration diagram for m::Operator:
[legend]

Public Member Functions

 Operator ()=default
 
 Operator (Operator &&other)
 
virtual ~Operator ()
 
Schemaschema ()
 Returns the Schema of this Operator.
 
const Schemaschema () const
 Returns the Schema of this Operator.
 
bool has_info () const
 
OperatorInformationinfo ()
 
const OperatorInformationinfo () const
 
std::unique_ptr< OperatorInformationinfo (std::unique_ptr< OperatorInformation > new_info)
 
virtual void assign_post_order_ids (std::size_t start_id=0UL) const
 Assigns IDs to the operator tree rooted in this in post-order starting with ID start_id.
 
virtual void reset_ids () const
 Resets the IDs of the operator tree rooted in this.
 
std::size_t id () const
 Returns the ID of this.
 
OperatorDatadata (OperatorData *data) const
 Attached OperatorData data to this Operator.
 
OperatorDatadata () const
 Returns the OperatorData attached to this Operator.
 
virtual void accept (OperatorVisitor &v)=0
 
virtual void accept (ConstOperatorVisitor &v) const =0
 
void minimize_schema ()
 Minimizes the Schema of this Operator.
 
void dot (std::ostream &out) const
 Prints a representation of this Operator and its descendants in the dot language.
 
void dump (std::ostream &out) const
 
void dump () const
 

Protected Attributes

std::size_t id_ = -1UL
 the ID of this Operator; used as index in the DP table of PhysicalOperator
 

Private Member Functions

void id (std::size_t id) const
 Sets the ID of this.
 

Private Attributes

Schema schema_
 the schema of this Operator
 
std::unique_ptr< OperatorInformationinfo_
 additional information about this Operator
 
OperatorDatadata_ = nullptr
 the data object associated to this Operator; may be nullptr
 

Friends

void swap (Operator &first, Operator &second)
 
M_EXPORT std::ostream & operator<< (std::ostream &out, const Operator &op)
 

Detailed Description

An Operator represents an operation in a query plan.

A plan is a tree structure of Operators. Operators can be evaluated to a sequence of tuples and have a Schema.

Definition at line 44 of file Operator.hpp.

Constructor & Destructor Documentation

◆ Operator() [1/2]

m::Operator::Operator ( )
default

◆ Operator() [2/2]

m::Operator::Operator ( Operator &&  other)
inline

Definition at line 63 of file Operator.hpp.

References m::swap().

◆ ~Operator()

virtual m::Operator::~Operator ( )
inlinevirtual

Definition at line 64 of file Operator.hpp.

Member Function Documentation

◆ accept() [1/2]

virtual void m::Operator::accept ( ConstOperatorVisitor v) const
pure virtual

◆ accept() [2/2]

virtual void m::Operator::accept ( OperatorVisitor &  v)
pure virtual

◆ assign_post_order_ids()

virtual void m::Operator::assign_post_order_ids ( std::size_t  start_id = 0UL) const
inlinevirtual

Assigns IDs to the operator tree rooted in this in post-order starting with ID start_id.

Reimplemented in m::Consumer.

Definition at line 81 of file Operator.hpp.

Referenced by m::PhysicalOptimizerImpl< PhysicalPlanTable >::cover().

◆ data() [1/2]

OperatorData * m::Operator::data ( ) const
inline

Returns the OperatorData attached to this Operator.

Definition at line 98 of file Operator.hpp.

◆ data() [2/2]

OperatorData * m::Operator::data ( OperatorData data) const
inline

Attached OperatorData data to this Operator.

Returns the previously attached OperatorData. May return nullptr.

Definition at line 96 of file Operator.hpp.

References data().

Referenced by data().

◆ dot()

M_LCOV_EXCL_STOP void Operator::dot ( std::ostream &  out) const

Prints a representation of this Operator and its descendants in the dot language.

Definition at line 100 of file Operator.cpp.

References m::and, m::html_escape(), id(), m::to_string(), and m::visit().

◆ dump() [1/2]

void Operator::dump ( ) const

Definition at line 221 of file Operator.cpp.

References dump().

Referenced by dump().

◆ dump() [2/2]

M_LCOV_EXCL_START void Operator::dump ( std::ostream &  out) const

Definition at line 220 of file Operator.cpp.

◆ has_info()

bool m::Operator::has_info ( ) const
inline

Definition at line 71 of file Operator.hpp.

◆ id() [1/2]

std::size_t m::Operator::id ( ) const
inline

◆ id() [2/2]

void m::Operator::id ( std::size_t  id) const
inlineprivate

Sets the ID of this.

Definition at line 91 of file Operator.hpp.

References id().

Referenced by id().

◆ info() [1/3]

OperatorInformation & m::Operator::info ( )
inline

Definition at line 72 of file Operator.hpp.

References M_insist.

Referenced by m::Optimizer::optimize_source_plans().

◆ info() [2/3]

const OperatorInformation & m::Operator::info ( ) const
inline

Definition at line 73 of file Operator.hpp.

References info().

Referenced by info().

◆ info() [3/3]

std::unique_ptr< OperatorInformation > m::Operator::info ( std::unique_ptr< OperatorInformation new_info)
inline

Definition at line 74 of file Operator.hpp.

References m::swap().

◆ minimize_schema()

void Operator::minimize_schema ( )

Minimizes the Schema of this Operator.

The Schema is reduced to the attributes actually required by ancestors of this Operator in the plan.

Definition at line 562 of file Operator.cpp.

Referenced by __attribute__().

◆ reset_ids()

virtual void m::Operator::reset_ids ( ) const
inlinevirtual

Resets the IDs of the operator tree rooted in this.

Reimplemented in m::Consumer.

Definition at line 83 of file Operator.hpp.

◆ schema() [1/2]

Schema & m::Operator::schema ( )
inline

◆ schema() [2/2]

const Schema & m::Operator::schema ( ) const
inline

Returns the Schema of this Operator.

Definition at line 69 of file Operator.hpp.

Friends And Related Function Documentation

◆ operator<<

M_EXPORT std::ostream & operator<< ( std::ostream &  out,
const Operator op 
)
friend

◆ swap

void swap ( Operator first,
Operator second 
)
friend

Definition at line 46 of file Operator.hpp.

Field Documentation

◆ data_

OperatorData* m::Operator::data_ = nullptr
mutableprivate

the data object associated to this Operator; may be nullptr

Definition at line 57 of file Operator.hpp.

◆ id_

std::size_t m::Operator::id_ = -1UL
mutableprotected

the ID of this Operator; used as index in the DP table of PhysicalOperator

Definition at line 59 of file Operator.hpp.

◆ info_

std::unique_ptr<OperatorInformation> m::Operator::info_
private

additional information about this Operator

Definition at line 56 of file Operator.hpp.

◆ schema_

Schema m::Operator::schema_
private

the schema of this Operator

Definition at line 55 of file Operator.hpp.


The documentation for this struct was generated from the following files: