1
0
Fork 0

added an assert (#10358)

This commit is contained in:
Jan 2019-11-04 22:52:45 +01:00 committed by GitHub
parent a7ec369d0b
commit 6fa2f2abc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -1621,6 +1621,7 @@ bool Expression::canRunOnDBServer() {
TRI_ASSERT(_node != nullptr);
return _node->canRunOnDBServer();
}
bool Expression::isDeterministic() {
if (_type == UNPROCESSED) {
initExpression();

View File

@ -7253,10 +7253,12 @@ void arangodb::aql::moveFiltersIntoEnumerateRule(Optimizer* opt, std::unique_ptr
if (!expr->isDeterministic() || !expr->canRunOnDBServer()) {
break;
}
if (expr->node() == nullptr) {
break;
}
TRI_ASSERT(!expr->willUseV8());
found.clear();
Ast::getReferencedVariables(expr->node(), found);
if (found.size() == 1 && found.find(outVariable) != found.end()) {