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

    https://github.com/apache/spark/pull/4433#discussion_r24274900
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/linalg/EigenValueDecomposition.scala
 ---
    @@ -66,6 +66,9 @@ private[mllib] object EigenValueDecomposition {
         // ncv must be smaller than n
         val ncv = math.min(2 * k, n)
     
    +    require(ncv * n.toLong < Integer.MAX_VALUE, "Product of 2*k*n must be 
smaller than " +
    --- End diff --
    
    Seems reasonable, though I have a few minor suggestions. I suppose `<=` is 
OK, technically? and if this size is worth checking, it's probably worth 
checking `ncv * (ncv + 8)` later. And then, maybe it's best to keep the check 
by the allocation so they don't get out of sync if someone changes them later.


---
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