Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7752#discussion_r35800780
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/linalg/Matrices.scala 
---
    @@ -179,14 +179,12 @@ private[spark] class MatrixUDT extends 
UserDefinedType[Matrix] {
             val tpe = row.getByte(0)
             val numRows = row.getInt(1)
             val numCols = row.getInt(2)
    -        val values = row.getAs[Seq[Double]](5, ArrayType(DoubleType, 
containsNull = false)).toArray
    +        val values = row.getArray(5).toArray.map(_.asInstanceOf[Double])
    --- End diff --
    
    actually i think in general we should have specialized getters even for 
toArray, and just call then. under the hood we can store them as objects and 
optimize them later, but it'd make the caller easier.



---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to