-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Enhancement/pattern expression #4916
Enhancement/pattern expression #4916
Conversation
e31cca8
to
6b9e137
Compare
201dd5b
to
23181f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done!
634ea61
to
8ef67c7
Compare
We should add PushFilterDownRollUpApply and PushFilterDownPatternApply rules. |
8ef67c7
to
3b3ad6d
Compare
Codecov ReportBase: 76.76% // Head: 76.79% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #4916 +/- ##
==========================================
+ Coverage 76.76% 76.79% +0.03%
==========================================
Files 1101 1103 +2
Lines 81180 81425 +245
==========================================
+ Hits 62317 62533 +216
- Misses 18863 18892 +29
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Please add test. |
This pr can be considered as an optimization or refactoring, and all the statement behavior is guaranteed by previous tests related to pattern expression. |
8ca99eb
to
27ca400
Compare
Now we don't hurry to tuning the LDBC according to the PR, you could transform the implementation to the optimizer rule. |
IMHO, implementing this in the optimizer is not necessarily better. |
Pls don‘t merge, wait for @yixinglu . |
c011382
to
bbfb49a
Compare
fix pattern apply executor add pattern predicate executor add pattern predicate flag fix edge cases fix unused rollup apply remove unnecessary project before PatternApply small rename fix anti-predicate fix anti-predicate fix where planner fix not flattened expression fix tck fix tck small delete
59fb7a7
to
e51fe53
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need some tck cases
As it says here: #4916 (comment) |
What type of PR is this?
Description:
This pr is optimized for the case of pattern expression as a predicate. In this case, the runtime doesn't actually have to construct the path. The principle is similar to sql semi apply related optimization.
Compared to previous implementations, this pr has three main optimization points:
For example:
Query statement:
MATCH (v:player)-->(n) where (v)-[:like]->() and size((v)-[:serve]-())>2 and v.age>3 and not (v)-[:teammate]-(n) RETURN id(v)
Old plan:
Optimized plan:
Special notes for your reviewer
I will fix some FIXMEs related to handling of expression later. Expression visitor needs to cover all expressions, and currently supports only simple expressions.
Checklist:
Tests:
Affects:
Release notes:
Optimize the implementation of pattern predicate.