spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea Pasqua (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-16035) The SparseVector parser fails checking for valid end parenthesis
Date Sat, 18 Jun 2016 00:56:05 GMT

     [ https://issues.apache.org/jira/browse/SPARK-16035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrea Pasqua updated SPARK-16035:
----------------------------------
    Description: 
Running
                      SparseVector.parse(' (4, [0,1 ],[ 4.0,5.0] ')
will not raise an exception as expected, although it parses it as if there was an end parenthesis.

This can be fixed by replacing

                      if start == -1:
                               raise ValueError("Tuple should end with ')'")

with
                     if end == -1:
                               raise ValueError("Tuple should end with ')'")

Please see posted PR

  was:
Running
```
SparseVector.parse(' (4, [0,1 ],[ 4.0,5.0] ')
```


> The SparseVector parser fails checking for valid end parenthesis
> ----------------------------------------------------------------
>
>                 Key: SPARK-16035
>                 URL: https://issues.apache.org/jira/browse/SPARK-16035
>             Project: Spark
>          Issue Type: Bug
>          Components: MLlib, PySpark
>    Affects Versions: 1.6.1, 2.0.0
>            Reporter: Andrea Pasqua
>            Priority: Minor
>
> Running
>                       SparseVector.parse(' (4, [0,1 ],[ 4.0,5.0] ')
> will not raise an exception as expected, although it parses it as if there was an end
parenthesis.
> This can be fixed by replacing
>                       if start == -1:
>                                raise ValueError("Tuple should end with ')'")
> with
>                      if end == -1:
>                                raise ValueError("Tuple should end with ')'")
> Please see posted PR



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message