mirror of https://gitee.com/bigwinds/arangodb
Implement the option to enter Subqueries first in the ExecutionBlock Walker too
(as in #d2a15253b0805ce2624eac4a44bb66b15c34a21e for the ExecutionNode)
This commit is contained in:
parent
d508812ec3
commit
1a80e19702
|
@ -179,6 +179,19 @@ bool ExecutionBlock::walk (WalkerWorker<ExecutionBlock>* worker) {
|
|||
return true;
|
||||
}
|
||||
|
||||
// Now handle a subquery:
|
||||
if ((_exeNode->getType() == ExecutionNode::SUBQUERY) &&
|
||||
worker->EnterSubQueryFirst()) {
|
||||
auto p = static_cast<SubqueryBlock*>(this);
|
||||
if (worker->enterSubquery(this, p->getSubquery())) {
|
||||
bool abort = p->getSubquery()->walk(worker);
|
||||
worker->leaveSubquery(this, p->getSubquery());
|
||||
if (abort) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now the children in their natural order:
|
||||
for (auto c : _dependencies) {
|
||||
if (c->walk(worker)) {
|
||||
|
@ -186,7 +199,8 @@ bool ExecutionBlock::walk (WalkerWorker<ExecutionBlock>* worker) {
|
|||
}
|
||||
}
|
||||
// Now handle a subquery:
|
||||
if (_exeNode->getType() == ExecutionNode::SUBQUERY) {
|
||||
if ((_exeNode->getType() == ExecutionNode::SUBQUERY) &&
|
||||
! worker->EnterSubQueryFirst()) {
|
||||
auto p = static_cast<SubqueryBlock*>(this);
|
||||
if (worker->enterSubquery(this, p->getSubquery())) {
|
||||
bool abort = p->getSubquery()->walk(worker);
|
||||
|
|
|
@ -529,7 +529,7 @@ bool ExecutionNode::walk (WalkerWorker<ExecutionNode>* worker) {
|
|||
}
|
||||
|
||||
// Now handle a subquery:
|
||||
if ((getType() == SUBQUERY) && worker->EnterSubQueryFirst()){
|
||||
if ((getType() == SUBQUERY) && worker->EnterSubQueryFirst()) {
|
||||
auto p = static_cast<SubqueryNode*>(this);
|
||||
if (worker->enterSubquery(this, p->getSubquery())) {
|
||||
bool abort = p->getSubquery()->walk(worker);
|
||||
|
@ -550,7 +550,7 @@ bool ExecutionNode::walk (WalkerWorker<ExecutionNode>* worker) {
|
|||
}
|
||||
|
||||
// Now handle a subquery:
|
||||
if ((getType() == SUBQUERY) && ! worker->EnterSubQueryFirst()){
|
||||
if ((getType() == SUBQUERY) && ! worker->EnterSubQueryFirst()) {
|
||||
auto p = static_cast<SubqueryNode*>(this);
|
||||
if (worker->enterSubquery(this, p->getSubquery())) {
|
||||
bool abort = p->getSubquery()->walk(worker);
|
||||
|
|
Loading…
Reference in New Issue