liyafan82 commented on a change in pull request #1832: [CALCITE-3827] Reduce
the time complexity of finding in-edges of a vertex in the graph
URL: https://github.com/apache/calcite/pull/1832#discussion_r384962892
##########
File path:
core/src/main/java/org/apache/calcite/util/graph/AttributedDirectedGraph.java
##########
@@ -57,20 +57,21 @@ public E addEdge(V vertex, V targetVertex) {
}
public E addEdge(V vertex, V targetVertex, Object... attributes) {
- final VertexInfo<V, E> info = vertexMap.get(vertex);
- if (info == null) {
+ final VertexInfo<V, E> outInfo = vertexOutMap.get(vertex);
Review comment:
The only difference is the method for creating edges. In the subclass, some
attributes are used to create the edge, and the attributes are passed in from
the method parameter list. This makes the method signatures different, so we
cannot use the methods from the super class.
Maybe we can solve this problem in a future issue.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services