1
0
Fork 0

don't tell GatherNode to sort data from an unsorted index

This commit is contained in:
jsteemann 2017-02-03 11:17:56 +01:00
parent eb89982279
commit f5a6818cdb
1 changed files with 9 additions and 7 deletions

View File

@ -2350,13 +2350,15 @@ void arangodb::aql::scatterInClusterRule(Optimizer* opt, ExecutionPlan* plan,
// Using Index for sort only works if all indexes are equal. // Using Index for sort only works if all indexes are equal.
auto first = allIndexes[0].getIndex(); auto first = allIndexes[0].getIndex();
for (auto const& path : first->fieldNames()) { if (first->isSorted()) {
elements.emplace_back(sortVariable, !isSortReverse, path); for (auto const& path : first->fieldNames()) {
} elements.emplace_back(sortVariable, !isSortReverse, path);
for (auto const& it : allIndexes) { }
if (first != it.getIndex()) { for (auto const& it : allIndexes) {
elements.clear(); if (first != it.getIndex()) {
break; elements.clear();
break;
}
} }
} }
} else if (nodeType == ExecutionNode::INSERT || } else if (nodeType == ExecutionNode::INSERT ||