1
0
Fork 0

renamed optimizer rule

This commit is contained in:
Jan Steemann 2014-08-19 16:10:57 +02:00
parent 70a4f49095
commit 232cc163c2
3 changed files with 6 additions and 7 deletions

View File

@ -50,8 +50,7 @@ Optimizer::Optimizer () {
// TODO: validate if this is really an optimization // TODO: validate if this is really an optimization
// registerRule(moveCalculationsUpRule, 1000); // registerRule(moveCalculationsUpRule, 1000);
// deactivated because a test crashes registerRule(removeUnnecessaryCalculationsRule, 999);
registerRule(removeUnnecessaryCalc, 999);
// Now sort them by pass: // Now sort them by pass:
std::stable_sort(_rules.begin(), _rules.end()); std::stable_sort(_rules.begin(), _rules.end());

View File

@ -224,10 +224,10 @@ int triagens::aql::moveCalculationsUpRule (Optimizer* opt,
/// @brief remove CalculationNode(s) that are never needed /// @brief remove CalculationNode(s) that are never needed
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
int triagens::aql::removeUnnecessaryCalc (Optimizer* opt, int triagens::aql::removeUnnecessaryCalculationsRule (Optimizer* opt,
ExecutionPlan* plan, ExecutionPlan* plan,
Optimizer::PlanList& out, Optimizer::PlanList& out,
bool& keep) { bool& keep) {
std::vector<ExecutionNode*> nodes std::vector<ExecutionNode*> nodes
= plan->findNodesOfType(triagens::aql::ExecutionNode::CALCULATION); = plan->findNodesOfType(triagens::aql::ExecutionNode::CALCULATION);
std::unordered_set<ExecutionNode*> toRemove; std::unordered_set<ExecutionNode*> toRemove;

View File

@ -55,7 +55,7 @@ namespace triagens {
/// @brief remove a CalculationNode that is never needed /// @brief remove a CalculationNode that is never needed
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
int removeUnnecessaryCalc (Optimizer*, ExecutionPlan*, Optimizer::PlanList&, bool&); int removeUnnecessaryCalculationsRule (Optimizer*, ExecutionPlan*, Optimizer::PlanList&, bool&);
} // namespace aql } // namespace aql
} // namespace triagens } // namespace triagens