mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
m::PrintOperator Struct Reference

Prints the produced Tuples to a std::ostream instance. More...

#include <Operator.hpp>

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

Public Member Functions

 PrintOperator (std::ostream &out)
 
PrintOperator clone_node () const
 Creates and returns a copy of this single operator node, i.e.
 
void accept (OperatorVisitor &v) override
 
void accept (ConstOperatorVisitor &v) const override
 
virtual void add_child (Producer *child)
 Adds a child to this Consumer and updates this Consumers schema accordingly.
 
virtual Producerset_child (Producer *child, std::size_t i)
 Sets the i-th child of this Consumer.
 
const std::vector< Producer * > & children () const
 Returns a reference to the children of this Consumer.
 
Producerchild (std::size_t i) const
 Returns the i-th child of this Consumer.
 
void assign_post_order_ids (std::size_t start_id=0UL) const override
 Assigns IDs to the operator tree rooted in this in post-order starting with ID start_id.
 
void reset_ids () const override
 Resets the IDs of the operator tree rooted in this.
 
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)
 
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.
 
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
 

Data Fields

std::ostream & out
 

Protected Member Functions

std::vector< Producer * > & children ()
 

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

std::vector< Producer * > children_
 the children of this Consumer
 
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
 

Detailed Description

Prints the produced Tuples to a std::ostream instance.

Definition at line 222 of file Operator.hpp.

Constructor & Destructor Documentation

◆ PrintOperator()

m::PrintOperator::PrintOperator ( std::ostream &  out)
inline

Definition at line 226 of file Operator.hpp.

Member Function Documentation

◆ accept() [1/2]

void m::PrintOperator::accept ( ConstOperatorVisitor v) const
overridevirtual

Implements m::Operator.

◆ accept() [2/2]

void m::PrintOperator::accept ( OperatorVisitor &  v)
overridevirtual

Implements m::Operator.

◆ add_child()

virtual void m::Consumer::add_child ( Producer child)
inlinevirtualinherited

Adds a child to this Consumer and updates this Consumers schema accordingly.

Reimplemented in m::JoinOperator, m::ProjectionOperator, m::GroupingOperator, and m::AggregationOperator.

Definition at line 146 of file Operator.hpp.

References m::Producer::parent(), and m::Operator::schema().

◆ assign_post_order_ids()

void m::Consumer::assign_post_order_ids ( std::size_t  start_id = 0UL) const
inlineoverridevirtualinherited

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

Reimplemented from m::Operator.

Definition at line 186 of file Operator.hpp.

◆ child()

Producer * m::Consumer::child ( std::size_t  i) const
inlineinherited

Returns the i-th child of this Consumer.

Definition at line 176 of file Operator.hpp.

◆ children() [1/2]

std::vector< Producer * > & m::Consumer::children ( )
inlineprotectedinherited

Definition at line 183 of file Operator.hpp.

◆ children() [2/2]

const std::vector< Producer * > & m::Consumer::children ( ) const
inlineinherited

Returns a reference to the children of this Consumer.

Definition at line 173 of file Operator.hpp.

◆ clone_node()

PrintOperator m::PrintOperator::clone_node ( ) const
inline

Creates and returns a copy of this single operator node, i.e.

only copies this operator without adding any inherited member fields like the parent or children nodes in the returned copy.

Definition at line 230 of file Operator.hpp.

◆ data() [1/2]

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

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
inlineinherited

Attached OperatorData data to this Operator.

Returns the previously attached OperatorData. May return nullptr.

Definition at line 96 of file Operator.hpp.

References m::Operator::data().

Referenced by m::Operator::data().

◆ dot()

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

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(), m::Operator::id(), m::to_string(), and m::visit().

◆ dump() [1/2]

void Operator::dump ( ) const
inherited

Definition at line 221 of file Operator.cpp.

References m::Operator::dump().

Referenced by m::Operator::dump().

◆ dump() [2/2]

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

Definition at line 220 of file Operator.cpp.

◆ has_info()

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

Definition at line 71 of file Operator.hpp.

◆ id() [1/2]

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

◆ id() [2/2]

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

Sets the ID of this.

Definition at line 91 of file Operator.hpp.

References m::Operator::id().

Referenced by m::Operator::id().

◆ info() [1/3]

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

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
inlineinherited

Definition at line 73 of file Operator.hpp.

References m::Operator::info().

Referenced by m::Operator::info().

◆ info() [3/3]

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

Definition at line 74 of file Operator.hpp.

References m::swap().

◆ minimize_schema()

void Operator::minimize_schema ( )
inherited

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()

void m::Consumer::reset_ids ( ) const
inlineoverridevirtualinherited

Resets the IDs of the operator tree rooted in this.

Reimplemented from m::Operator.

Definition at line 194 of file Operator.hpp.

◆ schema() [1/2]

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

◆ schema() [2/2]

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

Returns the Schema of this Operator.

Definition at line 69 of file Operator.hpp.

◆ set_child()

virtual Producer * m::Consumer::set_child ( Producer child,
std::size_t  i 
)
inlinevirtualinherited

Sets the i-th child of this Consumer.

Forces a recomputation of this Consumers schema.

Reimplemented in m::JoinOperator, m::ProjectionOperator, m::GroupingOperator, and m::AggregationOperator.

Definition at line 154 of file Operator.hpp.

References m::Producer::parent().

Field Documentation

◆ children_

std::vector<Producer*> m::Consumer::children_
privateinherited

the children of this Consumer

Definition at line 135 of file Operator.hpp.

◆ data_

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

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
mutableprotectedinherited

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_
privateinherited

additional information about this Operator

Definition at line 56 of file Operator.hpp.

◆ out

std::ostream& m::PrintOperator::out

Definition at line 224 of file Operator.hpp.

◆ schema_

Schema m::Operator::schema_
privateinherited

the schema of this Operator

Definition at line 55 of file Operator.hpp.


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