1
0
Fork 0
This commit is contained in:
jsteemann 2016-12-08 11:13:10 +01:00
parent 5416755049
commit b6606727ee
1 changed files with 3 additions and 3 deletions

View File

@ -4349,7 +4349,7 @@ bool applyGeoOptimization(bool near, ExecutionPlan* plan, GeoIndexInfo& info){
// avoid other constructs between sort/filter and enumerate collection // avoid other constructs between sort/filter and enumerate collection
ExecutionNode* current = res.executionNode->getFirstDependency(); ExecutionNode* current = res.executionNode->getFirstDependency();
ExecutionNode* end = res.collectionNode; ExecutionNode* end = res.collectionNode;
while(current != end){ while(current != end && current != nullptr){
if( current->getType() == EN::SORT if( current->getType() == EN::SORT
|| current->getType() == EN::COLLECT || current->getType() == EN::COLLECT
|| current->getType() == EN::FILTER || current->getType() == EN::FILTER
@ -4362,7 +4362,7 @@ bool applyGeoOptimization(bool near, ExecutionPlan* plan, GeoIndexInfo& info){
} }
// avoid sorts above index node // avoid sorts above index node
while(current != plan->root()){ while(current != plan->root() && current != nullptr){
if(current->getType() == EN::SORT){ if(current->getType() == EN::SORT){
return false; return false;
} }
@ -4425,6 +4425,6 @@ void arangodb::aql::geoIndexRule(Optimizer* opt,
} }
opt->addPlan(plan, rule, modified); opt->addPlan(plan, rule, modified);
LOG_TOPIC(DEBUG, Logger::DEVEL) << "EXIT GEO RULE - modified: " << modified; //LOG_TOPIC(DEBUG, Logger::DEVEL) << "EXIT GEO RULE - modified: " << modified;
//LOG_TOPIC(DEBUG, Logger::DEVEL) << ""; //LOG_TOPIC(DEBUG, Logger::DEVEL) << "";
} }