refact: fix some bugs & clean code #1741
Merged
corgiboygsj merged 9 commits intomasterfrom Mar 21, 2022
Merged
Conversation
javeme
reviewed
Jan 25, 2022
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.
|
javeme
reviewed
Feb 7, 2022
hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/AdamicAdarAPI.java
Show resolved
Hide resolved
javeme
reviewed
Feb 10, 2022
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
javeme
reviewed
Feb 11, 2022
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
javeme
reviewed
Feb 22, 2022
hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/VertexAPI.java
Outdated
Show resolved
Hide resolved
|
|
||
| long size = results.size(); | ||
| if (request.limit != Query.NO_LIMIT && size > request.limit) { | ||
| if (size > request.limit) { |
Contributor
There was a problem hiding this comment.
resume request.limit != Query.NO_LIMIT && to don't depend on NO_LIMIT value is LONG_MAX
Member
Author
There was a problem hiding this comment.
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
javeme
reviewed
Feb 22, 2022
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
javeme
reviewed
Feb 22, 2022
hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/steps/EdgeStep.java
Outdated
Show resolved
Hide resolved
javeme
approved these changes
Mar 18, 2022
corgiboygsj
approved these changes
Mar 21, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO: we should better not to use Long.MAX with limit in future, now keep it