mirror of https://gitee.com/bigwinds/arangodb
comments
This commit is contained in:
parent
4717979c74
commit
31b245fa73
|
@ -1381,27 +1381,12 @@ void QueryAst::optimizeRoot() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (member->type == NODE_TYPE_FOR) {
|
// TODO: replace trampoline variables / expressions
|
||||||
// peek forward and check if the for contains a FILTER that is always false
|
// TODO: detect common sub-expressions
|
||||||
bool isEmpty = false;
|
// TODO: remove always-true filters
|
||||||
|
// TODO: remove blocks that contains always-false filters
|
||||||
for (size_t j = i + 1; j < n; ++j) {
|
// TODO: pull up LET assignments
|
||||||
AstNode* sub = _root->getMember(j);
|
// TODO: pull up FILTER
|
||||||
|
|
||||||
if (sub == nullptr) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sub->type == NODE_TYPE_FILTER) {
|
|
||||||
// TODO: found a FILTER that is always false
|
|
||||||
isEmpty = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sub->type == NODE_TYPE_RETURN) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue