Github user dbtsai commented on a diff in the pull request: https://github.com/apache/spark/pull/6209#discussion_r30467430 --- Diff: mllib/src/main/scala/org/apache/spark/mllib/linalg/BLAS.scala --- @@ -473,13 +473,16 @@ private[spark] object BLAS extends Serializable with Logging { if (alpha == 0.0) { logDebug("gemv: alpha is equal to 0. Returning y.") } else { - A match { - case sparse: SparseMatrix => - gemv(alpha, sparse, x, beta, y) - case dense: DenseMatrix => - gemv(alpha, dense, x, beta, y) + (A, x) match { + case (sparse: SparseMatrix, dx: DenseVector) => + gemv(alpha, sparse, dx, beta, y) + case (dense: DenseMatrix, dx: DenseVector) => + gemv(alpha, dense, dx, beta, y) + case (dense: DenseMatrix, sx: SparseVector) => + gemv(alpha, dense, sx, beta, y) case _ => --- End diff -- If you don't really want to add `SparseMatrix` and `SparseVector`, the type safety will be broken when you call with this configuration. Previously, this function is totally type safe in compile time, and no way to get into "case _".
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org