liyafan82 opened a new pull request #1963: URL: https://github.com/apache/calcite/pull/1963
Currently, the source and target fields of class DefaultEdge is Object. This makes it necessary for some casts in the code base. In addition, it does not enforce the assertion that in a graph, the vertices have the same type as sources and targes in the edges. To solve the problem, we generify the DefaultEdge class with the type of the source/target vertices. The benefits of generfication includes type safety: the above assertion can be enforced by the generified class. It also gives the compiler an opportunity to detect type related problems at compilation time. Without generification, some problems can only be detected at runtime, when a ClassCastException is thrown. ---------------------------------------------------------------- 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]
