spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhengruifeng <>
Subject [GitHub] spark pull request #15564: [SPARK-17331][FOLLOWUP][ML][CORE] Avoid allocatin...
Date Thu, 20 Oct 2016 08:34:14 GMT
GitHub user zhengruifeng opened a pull request:

    [SPARK-17331][FOLLOWUP][ML][CORE] Avoid allocating 0-length arrays 

    ## What changes were proposed in this pull request?
    `Array[T]()` -> `Array.empty[T]` to avoid allocating 0-length arrays.
    Use regex `find . -name '*.scala' | xargs -i bash -c 'egrep "Array\[[A-Za-z]+\]\(\)" -n
{} && echo {}'` to find modification candidates.
    cc @srowen 
    ## How was this patch tested?
    existing tests

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

    $ git pull avoid_0_length_array

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

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

    This closes #15564
commit 50eb61ac92e2872d5311b1b9df7a48cbe9c9e51c
Author: Zheng RuiFeng <>
Date:   2016-10-20T07:33:04Z

    create pr


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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message