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

refact: fix some bugs & clean code #1741

Merged
merged 9 commits into from
Mar 21, 2022
Merged

refact: fix some bugs & clean code #1741

merged 9 commits into from
Mar 21, 2022

Conversation

imbajin
Copy link
Member

@imbajin imbajin commented Jan 25, 2022

TODO: we should better not to use Long.MAX with limit in future, now keep it

@codecov
Copy link

codecov bot commented Jan 25, 2022

Codecov Report

Merging #1741 (95af52d) into master (0ca54c4) will increase coverage by 4.35%.
The diff coverage is 77.77%.

@@             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     
Impacted Files Coverage Δ
.../java/com/baidu/hugegraph/api/graph/VertexAPI.java 35.46% <0.00%> (ø)
...va/com/baidu/hugegraph/api/traversers/KoutAPI.java 75.00% <ø> (ø)
...om/baidu/hugegraph/auth/StandardAuthenticator.java 44.00% <ø> (+0.57%) ⬆️
...in/java/com/baidu/hugegraph/StandardHugeGraph.java 67.13% <0.00%> (+1.23%) ⬆️
.../com/baidu/hugegraph/backend/cache/LevelCache.java 92.10% <ø> (ø)
...in/java/com/baidu/hugegraph/backend/id/IdUtil.java 86.79% <ø> (ø)
...a/com/baidu/hugegraph/backend/query/Condition.java 77.97% <ø> (+0.36%) ⬆️
.../java/com/baidu/hugegraph/backend/query/Query.java 86.11% <ø> (+0.39%) ⬆️
...m/baidu/hugegraph/backend/tx/GraphTransaction.java 80.08% <0.00%> (+0.02%) ⬆️
...idu/hugegraph/schema/builder/EdgeLabelBuilder.java 83.62% <0.00%> (+0.34%) ⬆️
... and 146 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0ca54c4...95af52d. Read the comment docs.

@imbajin imbajin changed the title feat(api): Support adamic-adar & resource-allocation algorithms chore: fix some bugs & clean code Feb 21, 2022
@@ -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) {
Copy link
Contributor

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

Copy link
Member Author

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

Copy link
Contributor

@javeme javeme left a 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

@imbajin imbajin changed the title chore: fix some bugs & clean code refact: fix some bugs & clean code Feb 24, 2022
@corgiboygsj corgiboygsj merged commit b591f7d into master Mar 21, 2022
@corgiboygsj corgiboygsj deleted the adamic-adar branch March 21, 2022 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants