Skip to content

Commit 2066258

Browse files
andreapasquamengxr
authored andcommitted
[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 <[email protected]> Closes #13750 from andreapasqua/sparse-vector-parser-assertion-fix. (cherry picked from commit 4c64e88) Signed-off-by: Xiangrui Meng <[email protected]>
1 parent 2859ea3 commit 2066258

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/pyspark/mllib/linalg/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def parse(s):
569569
if start == -1:
570570
raise ValueError("Tuple should start with '('")
571571
end = s.find(')')
572-
if start == -1:
572+
if end == -1:
573573
raise ValueError("Tuple should end with ')'")
574574
s = s[start + 1: end].strip()
575575

0 commit comments

Comments
 (0)