mirror of https://gitee.com/bigwinds/arangodb
don't tell GatherNode to sort data from an unsorted index
This commit is contained in:
parent
eb89982279
commit
f5a6818cdb
|
@ -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 ||
|
||||||
|
|
Loading…
Reference in New Issue