Skip to content

Conversation

@jonmclean
Copy link

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.

Jon McLean added 2 commits May 5, 2017 14:01
…ector. This situation can happen when the SparseVector has a size greater than zero but has no defined elements other than zero
@SparkQA
Copy link

SparkQA commented May 5, 2017

Test build #3693 has finished for PR 17877 at commit 5614f58.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@jonmclean
Copy link
Author

Fixed the style issue and ran the Scala style check locally.

@SparkQA
Copy link

SparkQA commented May 7, 2017

Test build #3695 has finished for PR 17877 at commit 8969f02.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

asfgit pushed a commit that referenced this pull request May 9, 2017
…ception

## 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 <[email protected]>

Closes #17877 from jonmclean/vectorArgmaxIndexBug.

(cherry picked from commit be53a78)
Signed-off-by: Sean Owen <[email protected]>
@srowen
Copy link
Member

srowen commented May 9, 2017

Merged to master/2.2/2.1

@asfgit asfgit closed this in be53a78 May 9, 2017
asfgit pushed a commit that referenced this pull request May 9, 2017
…ception

## 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 <[email protected]>

Closes #17877 from jonmclean/vectorArgmaxIndexBug.

(cherry picked from commit be53a78)
Signed-off-by: Sean Owen <[email protected]>
liyichao pushed a commit to liyichao/spark that referenced this pull request May 24, 2017
…ception

## 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 <[email protected]>

Closes apache#17877 from jonmclean/vectorArgmaxIndexBug.
jzhuge pushed a commit to jzhuge/spark that referenced this pull request Aug 20, 2018
…ception

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.

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

Author: Jon McLean <[email protected]>

Closes apache#17877 from jonmclean/vectorArgmaxIndexBug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants