Skip to content
Snippets Groups Projects
Commit 4c64e88d authored by andreapasqua's avatar andreapasqua Committed by Xiangrui Meng
Browse files

[SPARK-16035][PYSPARK] Fix SparseVector parser assertion for end parenthesis

## What changes were proposed in this pull request?
The check on the end parenthesis of the expression to parse was using the wrong variable. I corrected that.
## How was this patch tested?
Manual test

Author: andreapasqua <andrea@radius.com>

Closes #13750 from andreapasqua/sparse-vector-parser-assertion-fix.
parent d0ac0e6f
No related branches found
No related tags found
No related merge requests found
...@@ -569,7 +569,7 @@ class SparseVector(Vector): ...@@ -569,7 +569,7 @@ class SparseVector(Vector):
if start == -1: if start == -1:
raise ValueError("Tuple should start with '('") raise ValueError("Tuple should start with '('")
end = s.find(')') end = s.find(')')
if start == -1: if end == -1:
raise ValueError("Tuple should end with ')'") raise ValueError("Tuple should end with ')'")
s = s[start + 1: end].strip() s = s[start + 1: end].strip()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment