1
0
Fork 0

forward-port extra condition for single-shard optimization from 3.3

This commit is contained in:
jsteemann 2018-07-13 19:23:59 +02:00
parent 8fec3292f0
commit db3ca147ec
1 changed files with 11 additions and 0 deletions

View File

@ -4164,6 +4164,17 @@ void arangodb::aql::restrictToSingleShardRule(
toRemove.clear(); toRemove.clear();
break; break;
} }
if (c->getType() == EN::CALCULATION) {
auto cn = ExecutionNode::castTo<CalculationNode const*>(c);
auto expr = cn->expression();
if (expr != nullptr && !expr->canRunOnDBServer()) {
// found something that must not run on a DB server,
// but that must run on a coordinator. stop optimization here!
toRemove.clear();
break;
}
}
} }
for (auto const& it : toRemove) { for (auto const& it : toRemove) {