refact: fix some bugs & clean code by imbajin · Pull Request #1741 · apache/hugegraph

@imbajin

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

@imbajin

javeme

@codecov

@imbajin

javeme

@imbajin

javeme

@imbajin

javeme

@imbajin imbajin changed the title feat(api): Support adamic-adar & resource-allocation algorithms chore: fix some bugs & clean code

Feb 21, 2022

@imbajin

javeme


long size = results.size();
if (request.limit != Query.NO_LIMIT && size > request.limit) {
if (size > request.limit) {

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

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

@imbajin

javeme

@imbajin

javeme

@imbajin

javeme

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

@imbajin

javeme

corgiboygsj