Skip to content
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

Fix expression util function #5487

Merged
merged 2 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/graph/util/ExpressionUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,7 @@ void ExpressionUtils::splitFilter(const Expression *expr,
// TODO(czp): If find any not, dont pick this operand for now
if (ExpressionUtils::findAny(operand, {Expression::Kind::kUnaryNot})) {
filterUnpickedPtr->addOperand(operand->clone());
continue;
}
if (picker(operand)) {
filterPickedPtr->addOperand(operand->clone());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright (c) 2023 vesoft inc. All rights reserved.
#
# This source code is licensed under Apache 2.0 License.
@czp
Feature: Embed edge all predicate into Traverse

Background:
Expand Down Expand Up @@ -297,13 +296,13 @@ Feature: Embed edge all predicate into Traverse
Then the result should be, in any order:
| likeness | nage |
And the execution plan should be:
| id | name | dependencies | profiling data | operator info |
| 7 | Project | 11 | | |
| 11 | AppendVertices | 14 | | |
| 14 | Filter | 13 | | {"condition": "(!(all(__VAR_1 IN $e WHERE ($__VAR_1.likeness>89))) AND !(all(__VAR_1 IN $e WHERE ($__VAR_1.likeness>89))) AND !(all(__VAR_1 IN $e WHERE ($__VAR_1.likeness>89))))"} |
| 13 | Traverse | 1 | | {"edge filter": "(*.likeness>90)"} |
| 1 | IndexScan | 2 | | |
| 2 | Start | | | |
| id | name | dependencies | profiling data | operator info |
| 7 | Project | 11 | | |
| 11 | AppendVertices | 14 | | |
| 14 | Filter | 13 | | {"condition": "!(all(__VAR_1 IN $e WHERE ($__VAR_1.likeness>89)))"} |
| 13 | Traverse | 1 | | {"edge filter": "(*.likeness>90)"} |
| 1 | IndexScan | 2 | | |
| 2 | Start | | | |
When profiling query:
"""
MATCH (person:player)-[e1:like*1..2]-(friend:player)
Expand Down