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

Fix forced to Double and optimization error hint for top range #1432

Merged
merged 3 commits into from
Apr 28, 2021
Merged

Conversation

zyxxoo
Copy link
Contributor

@zyxxoo zyxxoo commented Apr 27, 2021

fix error hit and Integer case to Double

@zyxxoo zyxxoo changed the title Zy dev Fix forced to Double and optimization error hint for top range Apr 27, 2021
@codecov
Copy link

codecov bot commented Apr 27, 2021

Codecov Report

Merging #1432 (2473a21) into master (0e686ff) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1432   +/-   ##
=========================================
  Coverage     62.21%   62.22%           
- Complexity     5856     5858    +2     
=========================================
  Files           381      381           
  Lines         32135    32135           
  Branches       4504     4504           
=========================================
+ Hits          19993    19996    +3     
+ Misses        10090    10089    -1     
+ Partials       2052     2050    -2     
Impacted Files Coverage Δ Complexity Δ
...a/com/baidu/hugegraph/backend/query/Condition.java 78.46% <0.00%> (ø) 32.00% <0.00%> (ø%)
...du/hugegraph/backend/tx/GraphIndexTransaction.java 81.15% <0.00%> (+0.11%) 203.00% <0.00%> (ø%)
...c/main/java/com/baidu/hugegraph/task/HugeTask.java 69.84% <0.00%> (+0.30%) 82.00% <0.00%> (+1.00%)
...va/com/baidu/hugegraph/task/ServerInfoManager.java 70.78% <0.00%> (+0.56%) 51.00% <0.00%> (+1.00%)

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 0e686ff...2473a21. Read the comment docs.

@zyxxoo zyxxoo force-pushed the zy_dev branch 2 times, most recently from 04f3dd9 to 088d2a8 Compare April 28, 2021 04:02
@zyxxoo zyxxoo requested a review from Linary April 28, 2021 07:12
@Linary Linary merged commit dac208a into master Apr 28, 2021
@Linary Linary deleted the zy_dev branch April 28, 2021 07:15
@@ -244,7 +244,8 @@ private Ranks contributeNewLayer(List<Adjacencies> adjacencies,
public Step(HugeGraph g, Directions direction, List<String> labels,
long degree, long skipDegree, int top, int capacity) {
E.checkArgument(top > 0 && top <= MAX_TOP,
"The top of each layer can't exceed %s", MAX_TOP);
"The top of each layer must be in (0, %s]",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect if prompt the actual top value

}
return edgeWeight;
}

private double toDouble(Object obj) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set static

return ((Number) obj).doubleValue();
}

return (double) obj;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer to call NumericUtil.toNumber(obj).doubleValue()

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.

4 participants