You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2021/09/11 21:41:59 UTC

[spark] branch branch-3.1 updated: [SPARK-36685][ML][MLLIB] Fix wrong assert messages

This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 7c9941e  [SPARK-36685][ML][MLLIB] Fix wrong assert messages
7c9941e is described below

commit 7c9941eea0dbad8073a63a9f3b9496e2fbe15c14
Author: dgd-contributor <dg...@viettel.com.vn>
AuthorDate: Sat Sep 11 14:39:42 2021 -0700

    [SPARK-36685][ML][MLLIB] Fix wrong assert messages
    
    ### What changes were proposed in this pull request?
    Fix wrong assert statement, a mistake when coding
    
    ### Why are the changes needed?
     wrong assert statement
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    ### How was this patch tested?
     Existing tests
    
    Closes #33953 from dgd-contributor/SPARK-36685.
    
    Authored-by: dgd-contributor <dg...@viettel.com.vn>
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
    (cherry picked from commit 9af01325164c9ea49d70be3716b2c74d4aaf7522)
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
 mllib-local/src/main/scala/org/apache/spark/ml/linalg/Matrices.scala | 2 +-
 mllib/src/main/scala/org/apache/spark/mllib/linalg/Matrices.scala    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mllib-local/src/main/scala/org/apache/spark/ml/linalg/Matrices.scala b/mllib-local/src/main/scala/org/apache/spark/ml/linalg/Matrices.scala
index 1254ed7..f379473 100644
--- a/mllib-local/src/main/scala/org/apache/spark/ml/linalg/Matrices.scala
+++ b/mllib-local/src/main/scala/org/apache/spark/ml/linalg/Matrices.scala
@@ -1264,7 +1264,7 @@ object Matrices {
     var hasSparse = false
     var numRows = 0
     matrices.foreach { mat =>
-      require(numCols == mat.numCols, "The number of rows of the matrices in this sequence, " +
+      require(numCols == mat.numCols, "The number of columns of the matrices in this sequence, " +
         "don't match!")
       mat match {
         case sparse: SparseMatrix => hasSparse = true
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/linalg/Matrices.scala b/mllib/src/main/scala/org/apache/spark/mllib/linalg/Matrices.scala
index 57edc96..118c427 100644
--- a/mllib/src/main/scala/org/apache/spark/mllib/linalg/Matrices.scala
+++ b/mllib/src/main/scala/org/apache/spark/mllib/linalg/Matrices.scala
@@ -1175,7 +1175,7 @@ object Matrices {
     var hasSparse = false
     var numRows = 0
     matrices.foreach { mat =>
-      require(numCols == mat.numCols, "The number of rows of the matrices in this sequence, " +
+      require(numCols == mat.numCols, "The number of columns of the matrices in this sequence, " +
         "don't match!")
       mat match {
         case sparse: SparseMatrix => hasSparse = true

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org