-
Notifications
You must be signed in to change notification settings - Fork 832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect filter interpretation #3039
Comments
Potential fix: diff --git a/arangod/Aql/Ast.cpp b/arangod/Aql/Ast.cpp
index 726bceca4e..d63a89177c 100644
--- a/arangod/Aql/Ast.cpp
+++ b/arangod/Aql/Ast.cpp
@@ -2509,6 +2509,10 @@ AstNode* Ast::optimizeUnaryOperatorArithmetic(AstNode* node) {
/// the unary NOT operation will be replaced with the result of the operation
AstNode* Ast::optimizeNotExpression(AstNode* node) {
TRI_ASSERT(node != nullptr);
+ if (node->type != NODE_TYPE_OPERATOR_UNARY_NOT) {
+ return node;
+ }
+
TRI_ASSERT(node->type == NODE_TYPE_OPERATOR_UNARY_NOT);
TRI_ASSERT(node->numMembers() == 1);
diff --git a/arangod/Aql/Condition.cpp b/arangod/Aql/Condition.cpp
index a2400265d5..63443abb1b 100644
--- a/arangod/Aql/Condition.cpp
+++ b/arangod/Aql/Condition.cpp
@@ -1386,12 +1386,11 @@ AstNode* Condition::transformNode(AstNode* node) {
auto negated = transformNode(_ast->createNodeUnaryOperator(
NODE_TYPE_OPERATOR_UNARY_NOT, sub->getMemberUnchecked(i)));
auto optimized = _ast->optimizeNotExpression(negated);
-
newOperator->addMember(optimized);
}
- return newOperator;
- }
+ return transformNode(newOperator);
+ }
node->changeMember(0, transformNode(sub));
} I still need to confirm the fix with some test cases. |
Fixed in 3.2.2 |
ObiWahn
added a commit
that referenced
this issue
Aug 18, 2017
…ture/planning-499-different-error-codes-for-version-check * 'devel' of https://github.com/arangodb/arangodb: Feature/remove manual zippery (#3036) Fixed issue with autoincrement data not being persisted properly in RocksDB (#3059). (#3067) Bug fix/issues 1708 (#3060) Fix issue #3037: Foxx, internal server error when I try to add a new service (#3056) Bug fix/v8 syslog (#3055) Bug fix/small issues 1608 (#3049) fixed issue #3044 (#3048) fixed issue #3039 (#3045) Fix foxx github url (#3042) we need to substitute the package name here too - else enterprise pac… (#3025) Fixing engine stats in arangosh (#3038) MSVC is pendantic (but right) (#3047) reduce log spam (#3051) Feature/build docker to build using stretch container (#3062) build docker to build using stretch container (#3061) fix and extend journal-related tests (#3043)
ArangoDB 3.2.2 containing this bugfix is available for download - thanks for reporting. Closing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
my environment running ArangoDB
I'm using the latest ArangoDB of the respective release series:
Mode:
Storage-Engine:
On this operating system:
this is an AQL-related issue:
I'm issuing AQL via:
I've run
db._explain("<my aql query>")
and it didn't shed more light on this.The AQL query in question is:
I can forward you dataset via email.
I am aware of how to rewrite the query to make it work.
One odd solution is provided below (5th line of the query):
The text was updated successfully, but these errors were encountered: