mirror of https://gitee.com/bigwinds/arangodb
renamed optimizer rule
This commit is contained in:
parent
70a4f49095
commit
232cc163c2
|
@ -50,8 +50,7 @@ Optimizer::Optimizer () {
|
|||
// TODO: validate if this is really an optimization
|
||||
// registerRule(moveCalculationsUpRule, 1000);
|
||||
|
||||
// deactivated because a test crashes
|
||||
registerRule(removeUnnecessaryCalc, 999);
|
||||
registerRule(removeUnnecessaryCalculationsRule, 999);
|
||||
|
||||
// Now sort them by pass:
|
||||
std::stable_sort(_rules.begin(), _rules.end());
|
||||
|
|
|
@ -224,10 +224,10 @@ int triagens::aql::moveCalculationsUpRule (Optimizer* opt,
|
|||
/// @brief remove CalculationNode(s) that are never needed
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int triagens::aql::removeUnnecessaryCalc (Optimizer* opt,
|
||||
ExecutionPlan* plan,
|
||||
Optimizer::PlanList& out,
|
||||
bool& keep) {
|
||||
int triagens::aql::removeUnnecessaryCalculationsRule (Optimizer* opt,
|
||||
ExecutionPlan* plan,
|
||||
Optimizer::PlanList& out,
|
||||
bool& keep) {
|
||||
std::vector<ExecutionNode*> nodes
|
||||
= plan->findNodesOfType(triagens::aql::ExecutionNode::CALCULATION);
|
||||
std::unordered_set<ExecutionNode*> toRemove;
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace triagens {
|
|||
/// @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 triagens
|
||||
|
|
Loading…
Reference in New Issue