Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/20464
  
    @shivaram This fix is to make it correctly 1-based. Previously SparkR 
substr API substracts starting position by 1, so it becomes zero-based.
    
    This fix matches R's substr in above link as I test:
    ```R
    > substr("Michael", 4, 6)                                                   
                                                               
    [1] "hae"
    ```
    
    Before this fix, SparkR's substr returns "cha".


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to