-
Notifications
You must be signed in to change notification settings - Fork 527
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
feat(api-core): support label & property filtering for both edge and vertex & support kout dfs mode #2295
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2295 +/- ##
============================================
+ Coverage 65.09% 68.36% +3.27%
- Complexity 981 987 +6
============================================
Files 498 500 +2
Lines 41241 41516 +275
Branches 5738 5786 +48
============================================
+ Hits 26844 28384 +1540
+ Misses 11737 10375 -1362
- Partials 2660 2757 +97
... and 70 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Query.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/TraversalUtil.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Query.java
Outdated
Show resolved
Hide resolved
Add Steps parser to parse VESteps
…nfo) in Kneighbor
… info) in Kout * add Kout dfs algorithm
Main Changes: 1. move class NestedIterator from HugeTraverser.java to separate file 2. rollback to origin code
hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java
Show resolved
Hide resolved
HugeGraph graph) { | ||
ConditionQuery query, | ||
List<HasContainer> hasContainers, | ||
HugeGraph graph) { |
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.
can we revert the style changes in all files.
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.
ok, I reverted the style changes in all files
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.
ok, I reverted the style changes in all files
after applying the hugegraph-style.xml
we still get a string of differ format?
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.
ok, I reverted the style changes in all files
after apply the
hugegraph-style.xml
we still get a string of differ format?
The code after applying the hugegraph-style.xml
is different from the origin format and these updates are automatically made by IDEA save on action
.
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.
ok, I reverted the style changes in all files
after apply the
hugegraph-style.xml
we still get a string of differ format?The code after applying the
hugegraph-style.xml
is different from the origin format and these updates are automatically made by IDEAsave on action
.
get it,“save on action” need pay more attention,and I'll check it soon
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/Steps.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/Steps.java
Outdated
Show resolved
Hide resolved
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.
LGTM
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.
The filtering is supported in Kout Post and Kneighbor Post Apis, and is there a need for other apis?
yep if we already supported them & we need update the doc for the changes
hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
Outdated
Show resolved
Hide resolved
...aph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/iterator/NestedIterator.java
Outdated
Show resolved
Hide resolved
public static final String TRAVERSE_MODE_BFS = "breadth_first_search"; | ||
public static final String TRAVERSE_MODE_DFS = "depth_first_search"; |
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.
shall we use bfs
& dfs
for users to input? (just desc the full name in doc)
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.
Got it
Co-authored-by: imbajin <jin@apache.org>
Can I supported this feature of the rest apis in the next PR? As the code submitted this time has already been reviewed. And I will update the doc for all the changes in hugegraph-doc. |
hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
Outdated
Show resolved
Hide resolved
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.
Can I supported this feature of the rest apis in the next PR? As the code submitted this time has already been reviewed. And I will update the doc for all the changes in hugegraph-doc.
Fine & LGTM
…vertex & support kout dfs mode (apache#2295) - Support label & property filtering for both edge and vertex and the filtering is implemented in Kout Post and Kneighbor - Post Apis, reducing unnecessary graph searches through pruning - Support Kout dfs mode in Kout Post Api Originally only edge label filtering was supported, now label and property filtering for edge and vertex is supported. - add classes VEStepEntity and VEStep to support serialization in request - add class Steps to support filtering of edge and vertex in runtime(core) - add new method edgesOfVertex(Id source, Steps steps) to support label and property filtering for both edge and vertex in HugeTraverser.java --------- Co-authored-by: imbajin <jin@apache.org>
…vertex & support kout dfs mode (apache#2295) - Support label & property filtering for both edge and vertex and the filtering is implemented in Kout Post and Kneighbor - Post Apis, reducing unnecessary graph searches through pruning - Support Kout dfs mode in Kout Post Api Originally only edge label filtering was supported, now label and property filtering for edge and vertex is supported. - add classes VEStepEntity and VEStep to support serialization in request - add class Steps to support filtering of edge and vertex in runtime(core) - add new method edgesOfVertex(Id source, Steps steps) to support label and property filtering for both edge and vertex in HugeTraverser.java --------- Co-authored-by: imbajin <jin@apache.org>
…vertex & support kout dfs mode (#2295) - Support label & property filtering for both edge and vertex and the filtering is implemented in Kout Post and Kneighbor - Post Apis, reducing unnecessary graph searches through pruning - Support Kout dfs mode in Kout Post Api Originally only edge label filtering was supported, now label and property filtering for edge and vertex is supported. - add classes VEStepEntity and VEStep to support serialization in request - add class Steps to support filtering of edge and vertex in runtime(core) - add new method edgesOfVertex(Id source, Steps steps) to support label and property filtering for both edge and vertex in HugeTraverser.java --------- Co-authored-by: imbajin <jin@apache.org>
Purpose of the PR
Main Changes
Label & property filtering for edge and vertex
Originally only edge label filtering was supported, now label and property filtering for edge and vertex is supported.
Kout dfs mode
Add DFS-based Kout mode in Kout Post Api and users can select the algorithm throught request parameters.
Verifying these changes
Kout Post
are shown belowInitialize the Graph
Label & property filtering for edge and vertex in Kout Post
Kout Post dfs mode
Does this PR potentially affect the following parts?
Documentation Status
Doc - TODO
Doc - Done
Doc - No Need