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

The physical optimizer interface. More...

#include <PhysicalOptimizer.hpp>

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

Public Member Functions

virtual ~PhysicalOptimizer ()
 
template<typename PhysOp >
void register_operator ()
 Registers a new physical operator which then may be used to find a covering.
 
virtual void cover (const Operator &plan)=0
 Finds an optimal physical operator covering for the logical plan rooted in plan.
 
virtual bool has_plan () const =0
 Returns true iff a physical operator covering is found.
 
virtual std::unique_ptr< MatchBaseextract_plan ()=0
 Extracts the found physical operator covering by moving it out of the underlying physical plan table.
 
virtual void accept (PhysOptVisitor &v)=0
 
virtual void accept (ConstPhysOptVisitor &v) const =0
 

Protected Attributes

std::vector< std::unique_ptr< const pattern_matcher_base > > pattern_matchers_
 

‍all pattern matchers for all registered physical operators


 

Detailed Description

The physical optimizer interface.

The PhysicalOptimizer applies a tree covering algorithm (similar to instruction selection used in compilers) using dynamic programming to a logical plan to compute a physical operator covering that minimizes the costs under a given set of physical cost functions. Therefore, the optimizer stores available PhysicalOperators covering possibly multiple logical Operators.

Definition at line 259 of file PhysicalOptimizer.hpp.

Constructor & Destructor Documentation

◆ ~PhysicalOptimizer()

virtual m::PhysicalOptimizer::~PhysicalOptimizer ( )
inlinevirtual

Definition at line 266 of file PhysicalOptimizer.hpp.

Member Function Documentation

◆ accept() [1/2]

virtual void m::PhysicalOptimizer::accept ( ConstPhysOptVisitor &  v) const
pure virtual

◆ accept() [2/2]

virtual void m::PhysicalOptimizer::accept ( PhysOptVisitor &  v)
pure virtual

◆ cover()

virtual void m::PhysicalOptimizer::cover ( const Operator plan)
pure virtual

Finds an optimal physical operator covering for the logical plan rooted in plan.

Implemented in m::PhysicalOptimizerImpl< PhysicalPlanTable >.

◆ extract_plan()

virtual std::unique_ptr< MatchBase > m::PhysicalOptimizer::extract_plan ( )
pure virtual

Extracts the found physical operator covering by moving it out of the underlying physical plan table.

Implemented in m::PhysicalOptimizerImpl< PhysicalPlanTable >.

◆ has_plan()

virtual bool m::PhysicalOptimizer::has_plan ( ) const
pure virtual

Returns true iff a physical operator covering is found.

Implemented in m::PhysicalOptimizerImpl< PhysicalPlanTable >.

◆ register_operator()

template<typename PhysOp >
void m::PhysicalOptimizer::register_operator

Registers a new physical operator which then may be used to find a covering.

Definition at line 677 of file PhysicalOptimizer.hpp.

References pattern_matchers_, and m::visit().

Referenced by m::register_wasm_operators().

Field Documentation

◆ pattern_matchers_

std::vector<std::unique_ptr<const pattern_matcher_base> > m::PhysicalOptimizer::pattern_matchers_
protected

‍all pattern matchers for all registered physical operators

Definition at line 263 of file PhysicalOptimizer.hpp.

Referenced by register_operator().


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