-
Notifications
You must be signed in to change notification settings - Fork 525
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
refact: fix some bugs & clean code #1741
Conversation
hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PredictionAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PredictionAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/PredictionTraverser.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #1741 +/- ##
============================================
+ Coverage 66.50% 70.85% +4.35%
+ Complexity 735 690 -45
============================================
Files 446 446
Lines 37802 37774 -28
Branches 5392 5379 -13
============================================
+ Hits 25140 26766 +1626
+ Misses 9939 8287 -1652
+ Partials 2723 2721 -2
Continue to review full report at Codecov.
|
hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/AdamicAdarAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TableBackendEntry.java
Show resolved
Hide resolved
hugegraph-test/src/main/java/com/baidu/hugegraph/api/traversers/AdamicAdarAPITest.java
Outdated
Show resolved
Hide resolved
hugegraph-test/src/main/java/com/baidu/hugegraph/api/traversers/ResourceAllocationAPITest.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/StandardHugeGraph.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/ConditionQuery.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/ConditionQuery.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/ConditionQueryFlatten.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/tx/GraphIndexTransaction.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/structure/HugeVertex.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/steps/EdgeStep.java
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/VertexAPI.java
Outdated
Show resolved
Hide resolved
@@ -135,7 +134,7 @@ public String post(@Context GraphManager manager, | |||
} | |||
|
|||
long size = results.size(); | |||
if (request.limit != Query.NO_LIMIT && size > request.limit) { | |||
if (size > request.limit) { |
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.
resume request.limit != Query.NO_LIMIT &&
to don't depend on NO_LIMIT value is LONG_MAX
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.
fine, the root problem is we consider not use Long.Max
in future, otherwise it may lead a lot redundant condition & type casting
hugegraph-core/src/main/java/com/baidu/hugegraph/structure/HugeVertex.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/optimize/TraversalUtil.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/structure/HugeVertex.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Query.java
Outdated
Show resolved
Hide resolved
...aph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/records/KneighborRecords.java
Outdated
Show resolved
Hide resolved
...aph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/records/KneighborRecords.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/ConditionQuery.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/steps/EdgeStep.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.
+2, wait for #1763 merged
TODO: we should better not to use Long.MAX with limit in future, now keep it