-
Notifications
You must be signed in to change notification settings - Fork 504
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
support results count for kneighbor/kout/rings #995
Conversation
Codecov Report
@@ Coverage Diff @@
## master #995 +/- ##
============================================
- Coverage 69.54% 69.52% -0.02%
- Complexity 5249 5274 +25
============================================
Files 324 325 +1
Lines 25730 25805 +75
Branches 3619 3631 +12
============================================
+ Hits 17893 17940 +47
- Misses 6110 6142 +32
+ Partials 1727 1723 -4
Continue to review full report at Codecov.
|
implement: #994 Change-Id: Ieb7702a1bb8304391585704469cc7c7f6b07f565
Change-Id: Id9a2268d8f768d4b66e4b6499b7bb6d78212d1bb
if (countOnly) { | ||
return manager.serializer(g).writeMap(ImmutableMap.of( | ||
"count", paths.size())); | ||
} |
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.
reset these changes
public static class Step { | ||
|
||
private Directions direction; | ||
private Map<Id, String> labels; |
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.
add properties for filtering sortkey:
private Map<String, Object> properties;
return this.edgesOfVertex(target, currentStep); | ||
}); | ||
} else { | ||
// The last step, just query count |
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.
move out from for-loop
return new FilterIterator<>(flatten, e -> { | ||
if (this.containsTraversed) { | ||
// Count intermediate vertices | ||
this.count[0]++; |
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.
change count[0] to MutateLong
// Wrap steps to Iterator except last step | ||
for (int i = 1; i < stepNum - 1; i++) { | ||
Step currentStep = steps.get(i); | ||
if (i != stepNum - 1) { |
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.
remove it
return graph().queryNumber(query).longValue(); | ||
} | ||
|
||
private void filterBySortKeys(Query query, Map<Id, String> labels, |
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.
move to super class
implement: #994
Change-Id: Ieb7702a1bb8304391585704469cc7c7f6b07f565