imbajin commented on code in PR #2699:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2699#discussion_r1860315652


##########
hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java:
##########
@@ -179,18 +180,12 @@ public String post(@Context GraphManager manager,
         if (request.withVertex && !vertexIds.isEmpty()) {
             iterVertex = g.vertices(vertexIds.toArray());
             measure.addIterCount(vertexIds.size(), 0L);
-        } else {
-            iterVertex = vertexIds.iterator();
         }
 
-        Iterator<?> iterEdge = Collections.emptyIterator();
-        if (request.withPath) {
+        Iterator<Edge> iterEdge = Collections.emptyIterator();
+        if (request.withPath && request.withEdge) {
             Set<Edge> edges = results.edgeResults().getEdges(paths);
-            if (request.withEdge) {
-                iterEdge = edges.iterator();
-            } else {
-                iterEdge = 
HugeTraverser.EdgeRecord.getEdgeIds(edges).iterator();
-            }
+            iterEdge = edges.iterator();

Review Comment:
   Seems changed the param logic here?
   
   if we only set `withPath = true` and `withEdge = false`, we will loose the 
path info here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to