Github user yu-iskw commented on the pull request:

    https://github.com/apache/spark/pull/9525#issuecomment-154508219
  
    I think it would be natural to fix the Scala error message and fix the 
condition in Python. The algorithm checks not the indexes have duplicated 
values, but the indexes are sorted.
    
    @srowen  What do you think?
    
    ## Python
    Replace `>=` with `>`.
    ```
    if self.indices[i] > self.indices[i + 1]:
        raise TypeError("indices array must be sorted")
    ```
    
    ## Scala
    Change the message.
    ```
    require(prev < i, s"indices array must be sorted: $i.")
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to