mirror of https://gitee.com/bigwinds/arangodb
disabled optimization due to failing tests
This commit is contained in:
parent
a58c8661b5
commit
50e17b8c4f
|
@ -1270,12 +1270,14 @@ AstNode* Ast::optimizeBinaryOperatorRelational (AstNode* node) {
|
||||||
bool const lhsIsConst = lhs->isConstant();
|
bool const lhsIsConst = lhs->isConstant();
|
||||||
bool const rhsIsConst = rhs->isConstant();
|
bool const rhsIsConst = rhs->isConstant();
|
||||||
|
|
||||||
|
/*
|
||||||
|
currently disabled becauses it makes some tests fail
|
||||||
|
TODO: investigate
|
||||||
if (! lhs->canThrow() &&
|
if (! lhs->canThrow() &&
|
||||||
rhs->type == NODE_TYPE_LIST &&
|
rhs->type == NODE_TYPE_LIST &&
|
||||||
rhs->numMembers() <= 1 &&
|
rhs->numMembers() <= 1 &&
|
||||||
(node->type == NODE_TYPE_OPERATOR_BINARY_IN ||
|
(node->type == NODE_TYPE_OPERATOR_BINARY_IN ||
|
||||||
node->type == NODE_TYPE_OPERATOR_BINARY_NIN)) {
|
node->type == NODE_TYPE_OPERATOR_BINARY_NIN)) {
|
||||||
|
|
||||||
// turn an IN or a NOT IN with few members into an equality comparison
|
// turn an IN or a NOT IN with few members into an equality comparison
|
||||||
if (rhs->numMembers() == 0) {
|
if (rhs->numMembers() == 0) {
|
||||||
// IN with no members returns false
|
// IN with no members returns false
|
||||||
|
@ -1292,7 +1294,7 @@ AstNode* Ast::optimizeBinaryOperatorRelational (AstNode* node) {
|
||||||
}
|
}
|
||||||
// fall-through intentional
|
// fall-through intentional
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (! rhsIsConst) {
|
if (! rhsIsConst) {
|
||||||
return node;
|
return node;
|
||||||
|
|
|
@ -44,8 +44,8 @@ Json ExecutionStats::toJson () const {
|
||||||
Json json(Json::Array);
|
Json json(Json::Array);
|
||||||
json.set("writesExecuted", Json(static_cast<double>(writesExecuted)));
|
json.set("writesExecuted", Json(static_cast<double>(writesExecuted)));
|
||||||
json.set("writesIgnored", Json(static_cast<double>(writesIgnored)));
|
json.set("writesIgnored", Json(static_cast<double>(writesIgnored)));
|
||||||
json.set("scannedFull", Json(static_cast<double>(scannedFull)));
|
//json.set("scannedFull", Json(static_cast<double>(scannedFull)));
|
||||||
json.set("scannedIndex", Json(static_cast<double>(scannedIndex)));
|
//json.set("scannedIndex", Json(static_cast<double>(scannedIndex)));
|
||||||
|
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue