15namespace cnf {
struct CNF; }
16struct CardinalityEstimator;
18struct GroupingOperator;
20struct PlanTableLargeAndSparse;
21struct PlanTableSmallOrDense;
26 crtp_args<const PlanTableSmallOrDense&, const PlanTableLargeAndSparse&>::
27 args<const QueryGraph&, const CardinalityEstimator&, SmallBitset, const cnf::CNF&> { };
30 crtp_args<const PlanTableSmallOrDense&, const PlanTableLargeAndSparse&>::
31 args<const QueryGraph&, const CardinalityEstimator&, SmallBitset, SmallBitset, const cnf::CNF&> { };
34 crtp_args<const PlanTableSmallOrDense&, const PlanTableLargeAndSparse&>::
35 args<const QueryGraph&, const CardinalityEstimator&, SmallBitset, const std::vector<const ast::Expr*>&> { };
38 , calculate_join_cost_tag::base_type
39 , calculate_grouping_cost_tag::base_type
47 using calculate_filter_cost_tag::base_type::operator();
48 using calculate_join_cost_tag::base_type::operator();
49 using calculate_grouping_cost_tag::base_type::operator();
52 template<
typename PlanTable>
60 template<
typename PlanTable>
69 template<
typename PlanTable>
71 Subproblem sub,
const std::vector<const ast::Expr*> &group_by)
const
77template<
typename Actual>
79 , calculate_filter_cost_tag::derived_type<Actual>
80 , calculate_join_cost_tag::derived_type<Actual>
81 , calculate_grouping_cost_tag::derived_type<Actual>
double calculate_join_cost(const QueryGraph &G, const PlanTable &PT, const CardinalityEstimator &CE, Subproblem left, Subproblem right, const cnf::CNF &condition) const
Returns the total cost of performing a Join operation.
double calculate_filter_cost(const QueryGraph &G, const PlanTable &PT, const CardinalityEstimator &CE, Subproblem sub, const cnf::CNF &condition) const
Returns the total cost of performing a Filter operation.
virtual ~CostFunction()=default
double calculate_grouping_cost(const QueryGraph &G, const PlanTable &PT, const CardinalityEstimator &CE, Subproblem sub, const std::vector< const ast::Expr * > &group_by) const
Returns the total cost of performing a Grouping operation.
The query graph represents all data sources and joins in a graph structure.
Implements a small and efficient set over integers in the range of 0 to 63 (including).
A helper class to introduce a virtual method overload per type to a class hierarchy.
A CNF represents a conjunction of cnf::Clauses.