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

#include <Operator.hpp>

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

Public Member Functions

 JoinOperator (cnf::CNF predicate)
 
virtual void add_child (Producer *child) override
 Adds a child to this Consumer and updates this Consumers schema accordingly.
 
virtual Producerset_child (Producer *child, std::size_t i) override
 Sets the i-th child of this Consumer.
 
JoinOperator clone_node () const
 Creates and returns a copy of this single operator node, i.e.
 
const cnf::CNFpredicate () const
 
void accept (OperatorVisitor &v) override
 
void accept (ConstOperatorVisitor &v) const override
 
Consumerparent () const
 Returns the parent of this Producer.
 
Consumerparent (Consumer *c)
 Sets the parent of this Producer.
 
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.
 
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
 
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.
 

Static Public Attributes

static constexpr Schema::entry_type::constraints_t REMOVED_CONSTRAINTS
 

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

cnf::CNF predicate_
 
Consumerparent_
 the parent of this Producer
 
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
 
std::vector< Producer * > children_
 the children of this Consumer
 

Detailed Description

Definition at line 318 of file Operator.hpp.

Constructor & Destructor Documentation

◆ JoinOperator()

m::JoinOperator::JoinOperator ( cnf::CNF  predicate)
inline

Definition at line 327 of file Operator.hpp.

Member Function Documentation

◆ accept() [1/2]

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

Implements m::Operator.

◆ accept() [2/2]

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

Implements m::Operator.

◆ add_child()

virtual void m::JoinOperator::add_child ( Producer child)
inlineoverridevirtual

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

Reimplemented from m::Consumer.

Definition at line 330 of file Operator.hpp.

◆ assign_post_order_ids() [1/2]

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

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

◆ assign_post_order_ids() [2/2]

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

JoinOperator m::JoinOperator::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 350 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__().

◆ parent() [1/2]

Consumer * m::Producer::parent ( ) const
inlineinherited

◆ parent() [2/2]

Consumer * m::Producer::parent ( Consumer c)
inlineinherited

Sets the parent of this Producer.

Returns the previous parent. May return nullptr.

Definition at line 128 of file Operator.hpp.

◆ predicate()

const cnf::CNF & m::JoinOperator::predicate ( ) const
inline

Definition at line 352 of file Operator.hpp.

◆ reset_ids() [1/2]

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

Resets the IDs of the operator tree rooted in this.

Reimplemented in m::Consumer.

Definition at line 83 of file Operator.hpp.

◆ reset_ids() [2/2]

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::JoinOperator::set_child ( Producer child,
std::size_t  i 
)
inlineoverridevirtual

Sets the i-th child of this Consumer.

Forces a recomputation of this Consumers schema.

Reimplemented from m::Consumer.

Definition at line 338 of file Operator.hpp.

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.

◆ parent_

Consumer* m::Producer::parent_
privateinherited

the parent of this Producer

Definition at line 122 of file Operator.hpp.

◆ predicate_

cnf::CNF m::JoinOperator::predicate_
private

Definition at line 324 of file Operator.hpp.

◆ REMOVED_CONSTRAINTS

constexpr Schema::entry_type::constraints_t m::JoinOperator::REMOVED_CONSTRAINTS
staticconstexpr
Initial value:
=
@ REFERENCES_UNIQUE
entry references unique values
Definition: Schema.hpp:82
@ UNIQUE
entry has unique values
Definition: Schema.hpp:81

Definition at line 320 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: