GitHub user viirya opened a pull request:

    https://github.com/apache/spark/pull/20464

    [SPARK-23291][SQL][R] R's substr should not reduce starting position by 1 
when calling Scala API

    ## What changes were proposed in this pull request?
    
    Seems R's substr API treats Scala substr API as zero based and so subtracts 
the given starting position by 1. Because SQL's substr also accepts zero-based 
starting position, this also causes incorrect results when the starting 
position is greater than 1, but we don't have related tests in R.
    
    ## How was this patch tested?
    
    Modified tests.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/viirya/spark-1 SPARK-23291

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/20464.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #20464
    
----
commit a2ffdc14ebfa67656e3598f0a0a0131f18f98aa5
Author: Liang-Chi Hsieh <viirya@...>
Date:   2018-02-01T03:10:53Z

    R's substr should not reduce starting position by 1 when calling Scala API.

----


---

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

Reply via email to