Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-14219][GRAPHX] Fix
pickRandomVertex
not to fall into infinit…
…e loops for graphs with one vertex ## What changes were proposed in this pull request? Currently, `GraphOps.pickRandomVertex()` falls into infinite loops for graphs having only one vertex. This PR fixes it by modifying the following termination-checking condition. ```scala - if (selectedVertices.count > 1) { + if (selectedVertices.count > 0) { ``` ## How was this patch tested? Pass the Jenkins tests (including new test case). Author: Dongjoon Hyun <dongjoon@apache.org> Closes #12018 from dongjoon-hyun/SPARK-14219.
- Loading branch information