From 50e17b8c4f4495005aad4f6b697a0881c7dc28c7 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Fri, 19 Sep 2014 19:30:57 +0200 Subject: [PATCH] disabled optimization due to failing tests --- arangod/Aql/Ast.cpp | 6 ++++-- arangod/Aql/ExecutionStats.cpp | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arangod/Aql/Ast.cpp b/arangod/Aql/Ast.cpp index 08c6f58e20..043cad54ed 100644 --- a/arangod/Aql/Ast.cpp +++ b/arangod/Aql/Ast.cpp @@ -1270,12 +1270,14 @@ AstNode* Ast::optimizeBinaryOperatorRelational (AstNode* node) { bool const lhsIsConst = lhs->isConstant(); bool const rhsIsConst = rhs->isConstant(); + /* + currently disabled becauses it makes some tests fail + TODO: investigate if (! lhs->canThrow() && rhs->type == NODE_TYPE_LIST && rhs->numMembers() <= 1 && (node->type == NODE_TYPE_OPERATOR_BINARY_IN || node->type == NODE_TYPE_OPERATOR_BINARY_NIN)) { - // turn an IN or a NOT IN with few members into an equality comparison if (rhs->numMembers() == 0) { // IN with no members returns false @@ -1292,8 +1294,8 @@ AstNode* Ast::optimizeBinaryOperatorRelational (AstNode* node) { } // fall-through intentional } + */ - if (! rhsIsConst) { return node; } diff --git a/arangod/Aql/ExecutionStats.cpp b/arangod/Aql/ExecutionStats.cpp index 4b77af33be..a19a39ef93 100644 --- a/arangod/Aql/ExecutionStats.cpp +++ b/arangod/Aql/ExecutionStats.cpp @@ -44,8 +44,8 @@ Json ExecutionStats::toJson () const { Json json(Json::Array); json.set("writesExecuted", Json(static_cast(writesExecuted))); json.set("writesIgnored", Json(static_cast(writesIgnored))); - json.set("scannedFull", Json(static_cast(scannedFull))); - json.set("scannedIndex", Json(static_cast(scannedIndex))); + //json.set("scannedFull", Json(static_cast(scannedFull))); + //json.set("scannedIndex", Json(static_cast(scannedIndex))); return json; }