Skip to content

Commit 3f1d730

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 <andrea@radius.com> Closes apache#13750 from andreapasqua/sparse-vector-parser-assertion-fix. (cherry picked from commit 4c64e88) Signed-off-by: Xiangrui Meng <meng@databricks.com>
1 parent fd05389 commit 3f1d730

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python/pyspark/mllib/linalg/__init__.py

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

0 commit comments

Comments
 (0)