https://github.com/apache/spark
Revision f7a91a17e8e20965b3e634e611690a96f72cec6b authored by Jon McLean on 09 May 2017, 08:47:50 UTC, committed by Sean Owen on 09 May 2017, 08:48:09 UTC
## What changes were proposed in this pull request?

Added a check for for the number of defined values.  Previously the argmax function assumed that at least one value was defined if the vector size was greater than zero.

## How was this patch tested?

Tests were added to the existing VectorsSuite to cover this case.

Author: Jon McLean <jon.mclean@atsid.com>

Closes #17877 from jonmclean/vectorArgmaxIndexBug.

(cherry picked from commit be53a78352ae7c70d8a07d0df24574b3e3129b4a)
Signed-off-by: Sean Owen <sowen@cloudera.com>
1 parent a1112c6
History
Tip revision: f7a91a17e8e20965b3e634e611690a96f72cec6b authored by Jon McLean on 09 May 2017, 08:47:50 UTC
[SPARK-20615][ML][TEST] SparseVector.argmax throws IndexOutOfBoundsException
Tip revision: f7a91a1

README.md

back to top