1
0
Fork 0

Finish taking into account multiple FILTER for IndexRangeRule.

This commit is contained in:
Max Neunhoeffer 2014-08-29 16:57:34 +02:00
parent 4ae076db40
commit fa9e55eafb
2 changed files with 6 additions and 6 deletions

View File

@ -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()) {

View File

@ -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()) {