![]() |
mutable
A Database System for Research and Fast Prototyping
|
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) |
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.
using m::PartialPlanGenerator::callback_type = std::function<void(const partial_plan_type&)> |
Definition at line 21 of file PartialPlanGenerator.hpp.
using m::PartialPlanGenerator::partial_plan_type = std::vector<Subproblem> |
Definition at line 20 of file PartialPlanGenerator.hpp.
Definition at line 19 of file PartialPlanGenerator.hpp.
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().
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 | ||
) |
Definition at line 89 of file PartialPlanGenerator.cpp.
References m::SmallBitset::begin(), m::SmallBitset::is_singleton(), M_insist, and m::QueryGraph::sources().
Referenced by m::execute_statement().