mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Public Types | Public Member Functions
m::PartialPlanGenerator Struct Reference

A partial plan is a set of (potentially incomplete) pairwise disjoint plans. More...

#include <PartialPlanGenerator.hpp>

Public Types

using Subproblem = SmallBitset
 
using partial_plan_type = std::vector< Subproblem >
 
using callback_type = std::function< void(const partial_plan_type &)>
 

Public Member Functions

template<typename PlanTable >
void for_each_complete_partial_plan (const PlanTable &PT, callback_type callback)
 Given a PlanTable with a final plan, enumerate all complete partial plans of this final plan and invoke callback for each such complete partial plan.
 
template<typename PlanTable >
void write_partial_plans_JSON (std::ostream &out, const QueryGraph &G, const PlanTable &PT, std::function< void(callback_type)> for_each_partial_plan)
 

Detailed Description

A partial plan is a set of (potentially incomplete) pairwise disjoint plans.

Each plan is uniquely represented by its root, encoded as a Subproblem. We say that a partial plan is a complete partial plan if each relations of a query occurs exactly once as leaf in the partial plan.

Definition at line 17 of file PartialPlanGenerator.hpp.

Member Typedef Documentation

◆ callback_type

using m::PartialPlanGenerator::callback_type = std::function<void(const partial_plan_type&)>

Definition at line 21 of file PartialPlanGenerator.hpp.

◆ partial_plan_type

Definition at line 20 of file PartialPlanGenerator.hpp.

◆ Subproblem

Definition at line 19 of file PartialPlanGenerator.hpp.

Member Function Documentation

◆ for_each_complete_partial_plan()

template<typename PlanTable >
template void PartialPlanGenerator::for_each_complete_partial_plan ( const PlanTable &  PT,
callback_type  callback 
)

Given a PlanTable with a final plan, enumerate all complete partial plans of this final plan and invoke callback for each such complete partial plan.

‍The set of partial plans used.

‍The set of remaining partial plan candidates. If empty, partial_plans is complete.

‍Stores the decision whether a partial plan was used in the current trace.

Definition at line 10 of file PartialPlanGenerator.cpp.

References M_insist.

Referenced by m::execute_statement().

◆ write_partial_plans_JSON()

template<typename PlanTable >
template void PartialPlanGenerator::write_partial_plans_JSON ( std::ostream &  out,
const QueryGraph G,
const PlanTable &  PT,
std::function< void(callback_type)>  for_each_partial_plan 
)

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