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
ExecutionNode* current = res.executionNode->getFirstDependency();
ExecutionNode* end = res.collectionNode;
while(current != end){
while(current != end && current != nullptr){
if( current->getType() == EN::SORT
|| current->getType() == EN::COLLECT
|| current->getType() == EN::FILTER
@ -4362,7 +4362,7 @@ bool applyGeoOptimization(bool near, ExecutionPlan* plan, GeoIndexInfo& info){
}
// avoid sorts above index node
while(current != plan->root()){
while(current != plan->root() && current != nullptr){
if(current->getType() == EN::SORT){
return false;
}
@ -4425,6 +4425,6 @@ void arangodb::aql::geoIndexRule(Optimizer* opt,
}
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) << "";
}