GitHub user pepinoflo opened a pull request:

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

    [SPARK-23925][SQL] Add array_repeat collection function

    ## What changes were proposed in this pull request?
    
    The PR adds a new collection function, array_repeat. As there already was a 
function repeat with the same signature, with the only difference being the 
expected return type (String instead of Array), the new function is called 
array_repeat to distinguish.
    The behaviour of the function is based on Presto's one.
    
    The function creates an array containing a given element repeated the 
requested number of times.
    
    ## How was this patch tested?
    
    New unit tests added into:
    - CollectionExpressionsSuite
    - DataFrameFunctionsSuite


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

    $ git pull https://github.com/pepinoflo/spark SPARK-23925

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

    https://github.com/apache/spark/pull/21208.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 #21208
    
----
commit f5a23cf8321ddca315c92fdf7366974469ce6395
Author: Florent Pépin <florent.pepin14@...>
Date:   2018-05-01T18:07:34Z

    [SPARK-23925][SQL] Add array_repeat function

commit ce2a9ddd1abf91f3c1abe1bf4b437a063dccfecb
Author: Florent Pépin <florent.pepin14@...>
Date:   2018-05-01T20:00:34Z

    Merge master into branch

commit 88d84252eb87e9d16b0e274db6db007133999e78
Author: Florent Pépin <florent.pepin14@...>
Date:   2018-05-01T21:12:38Z

    Fix false string to FalseLiteral

----


---

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

Reply via email to