Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/19078#discussion_r135950507
--- Diff: mllib/src/main/scala/org/apache/spark/mllib/feature/PCA.scala ---
@@ -44,6 +44,14 @@ class PCA @Since("1.4.0") (@Since("1.4.0") val k: Int) {
Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/19078#discussion_r135950323
--- Diff: mllib/src/main/scala/org/apache/spark/mllib/feature/PCA.scala ---
@@ -44,6 +44,14 @@ class PCA @Since("1.4.0") (@Since("1.4.0") val k: Int) {
Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/19078#discussion_r135950242
--- Diff: mllib/src/main/scala/org/apache/spark/mllib/feature/PCA.scala ---
@@ -44,6 +44,13 @@ class PCA @Since("1.4.0") (@Since("1.4.0") val k: Int) {
Github user WeichenXu123 commented on a diff in the pull request:
https://github.com/apache/spark/pull/19078#discussion_r135751225
--- Diff: mllib/src/main/scala/org/apache/spark/mllib/feature/PCA.scala ---
@@ -44,6 +44,13 @@ class PCA @Since("1.4.0") (@Since("1.4.0") val k: Int) {
Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/19078#discussion_r135749198
--- Diff: mllib/src/main/scala/org/apache/spark/mllib/feature/PCA.scala ---
@@ -44,6 +44,13 @@ class PCA @Since("1.4.0") (@Since("1.4.0") val k: Int) {
GitHub user WeichenXu123 opened a pull request:
https://github.com/apache/spark/pull/19078
[SPARK-21862] Add overflow check in PCA
## What changes were proposed in this pull request?
add overflow check in PCA, otherwise it is possible to throw
`NegativeArraySizeException` w