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
|
// 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());
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue