mirror of https://gitee.com/bigwinds/arangodb
Finish taking into account multiple FILTER for IndexRangeRule.
This commit is contained in:
parent
4ae076db40
commit
fa9e55eafb
|
@ -100,12 +100,7 @@ int Optimizer::createPlans (ExecutionPlan* plan,
|
|||
|
||||
_newPlans.clear();
|
||||
|
||||
// int pass = 1;
|
||||
while (leastDoneLevel < maxRuleLevel) {
|
||||
/*
|
||||
std::cout << "Entering pass " << pass << " of query optimization..."
|
||||
<< std::endl;
|
||||
*/
|
||||
// Find variable usage for all old plans now:
|
||||
for (auto p : _plans.list) {
|
||||
if (! p->varUsageComputed()) {
|
||||
|
|
|
@ -398,7 +398,12 @@ class FilterToEnumCollFinder : public WalkerWorker<ExecutionNode> {
|
|||
bool before (ExecutionNode* en) {
|
||||
_canThrow = (_canThrow || en->canThrow()); // can any node walked over throw?
|
||||
|
||||
if (en->getType() == triagens::aql::ExecutionNode::CALCULATION) {
|
||||
if (en->getType() == triagens::aql::ExecutionNode::FILTER) {
|
||||
std::vector<Variable const*> inVar = en->getVariablesUsedHere();
|
||||
TRI_ASSERT(inVar.size() == 1);
|
||||
_varIds.insert(inVar[0]->id);
|
||||
}
|
||||
else if (en->getType() == triagens::aql::ExecutionNode::CALCULATION) {
|
||||
auto outvar = en->getVariablesSetHere();
|
||||
TRI_ASSERT(outvar.size() == 1);
|
||||
if (_varIds.find(outvar[0]->id) != _varIds.end()) {
|
||||
|
|
Loading…
Reference in New Issue