![]() |
mutable
A Database System for Research and Fast Prototyping
|
A Consumer
is an Operator
that can be evaluated on a sequence of tuples.
More...
#include <Operator.hpp>
Public Member Functions | |
Consumer ()=default | |
Consumer (Consumer &&)=default | |
virtual | ~Consumer () |
virtual void | add_child (Producer *child) |
Adds a child to this Consumer and updates this Consumer s schema accordingly. | |
virtual Producer * | set_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 . | |
Producer * | child (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 . | |
Schema & | schema () |
Returns the Schema of this Operator . | |
const Schema & | schema () const |
Returns the Schema of this Operator . | |
bool | has_info () const |
OperatorInformation & | info () |
const OperatorInformation & | info () const |
std::unique_ptr< OperatorInformation > | info (std::unique_ptr< OperatorInformation > new_info) |
std::size_t | id () const |
Returns the ID of this . | |
OperatorData * | data (OperatorData *data) const |
Attached OperatorData data to this Operator . | |
OperatorData * | data () 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 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< OperatorInformation > | info_ |
additional information about this Operator | |
OperatorData * | data_ = nullptr |
the data object associated to this Operator ; may be nullptr | |
A Consumer
is an Operator
that can be evaluated on a sequence of tuples.
Definition at line 132 of file Operator.hpp.
|
default |
|
default |
|
inlinevirtual |
Definition at line 140 of file Operator.hpp.
|
pure virtualinherited |
|
pure virtualinherited |
|
inlinevirtual |
Adds a child
to this Consumer
and updates this Consumer
s 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().
|
inlineoverridevirtual |
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.
|
inline |
Returns the i
-th child of this Consumer
.
Definition at line 176 of file Operator.hpp.
|
inlineprotected |
Definition at line 183 of file Operator.hpp.
|
inline |
Returns a reference to the children of this Consumer
.
Definition at line 173 of file Operator.hpp.
|
inlineinherited |
Returns the OperatorData
attached to this Operator
.
Definition at line 98 of file Operator.hpp.
|
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().
|
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().
|
inherited |
Definition at line 221 of file Operator.cpp.
References m::Operator::dump().
Referenced by m::Operator::dump().
|
inherited |
Definition at line 220 of file Operator.cpp.
|
inlineinherited |
Definition at line 71 of file Operator.hpp.
|
inlineinherited |
Returns the ID of this
.
Definition at line 85 of file Operator.hpp.
References M_insist.
Referenced by m::PhysicalOptimizerImpl< PhysicalPlanTable >::cover(), m::Operator::dot(), m::GroupingOperator::GroupingOperator(), and m::ProjectionOperator::ProjectionOperator().
|
inlineprivateinherited |
Sets the ID of this
.
Definition at line 91 of file Operator.hpp.
References m::Operator::id().
Referenced by m::Operator::id().
|
inlineinherited |
Definition at line 72 of file Operator.hpp.
References M_insist.
Referenced by m::Optimizer::optimize_source_plans().
|
inlineinherited |
Definition at line 73 of file Operator.hpp.
References m::Operator::info().
Referenced by m::Operator::info().
|
inlineinherited |
Definition at line 74 of file Operator.hpp.
References m::swap().
|
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__().
|
inlineoverridevirtual |
Resets the IDs of the operator tree rooted in this
.
Reimplemented from m::Operator.
Definition at line 194 of file Operator.hpp.
|
inlineinherited |
Returns the Schema
of this Operator
.
Definition at line 67 of file Operator.hpp.
Referenced by add_child(), m::ProjectionOperator::add_child(), m::GroupingOperator::add_child(), m::AggregationOperator::AggregationOperator(), m::Match< wasm::Scan< SIMDfied > >::execute(), m::Match< wasm::IndexScan< IndexMethod > >::execute(), m::Match< wasm::Filter< Predicated > >::execute(), m::Match< wasm::LazyDisjunctiveFilter >::execute(), m::Match< wasm::Projection >::execute(), m::Match< wasm::NestedLoopsJoin< Predicated > >::execute(), m::Match< wasm::SimpleHashJoin< UniqueBuild, Predicated > >::execute(), m::Match< wasm::HashBasedGroupJoin >::execute(), m::GroupingOperator::GroupingOperator(), m::ProjectionOperator::ProjectionOperator(), m::ProjectionOperator::set_child(), and m::GroupingOperator::set_child().
|
inlineinherited |
Returns the Schema
of this Operator
.
Definition at line 69 of file Operator.hpp.
Sets the i
-th child
of this Consumer
.
Forces a recomputation of this Consumer
s schema.
Reimplemented in m::JoinOperator, m::ProjectionOperator, m::GroupingOperator, and m::AggregationOperator.
Definition at line 154 of file Operator.hpp.
References m::Producer::parent().
|
private |
the children of this Consumer
Definition at line 135 of file Operator.hpp.
|
mutableprivateinherited |
the data object associated to this Operator
; may be nullptr
Definition at line 57 of file Operator.hpp.
|
mutableprotectedinherited |
the ID of this Operator
; used as index in the DP table of PhysicalOperator
Definition at line 59 of file Operator.hpp.
|
privateinherited |
additional information about this Operator
Definition at line 56 of file Operator.hpp.
|
privateinherited |
the schema of this Operator
Definition at line 55 of file Operator.hpp.