GitHub user izendejas opened a pull request:

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

    Minor optimizations. Use safer take, tail methods.

    Per an email thread I initiated and after feedback and clearing my ICLA, 
I'm requesting some minor changes be pulled to use the more readable and safer 
take/tail calls over slice. Also, found an unnecessary Seq instantiation to 
compute the min of two values. Got rid of reverse sortBys which used negation 
as they weren't as readable.
    
    Did not create a JIRA as these are very minor, but can do so.

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

    $ git pull https://github.com/izendejas/spark master

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

    https://github.com/apache/spark/pull/473.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 #473
    
----
commit 81065aed9987c1b08cd5784b7a6153e26f3f7402
Author: Ignacio Zendejas <[email protected]>
Date:   2014-04-10T20:43:07Z

    Some minor optimizations to hopefully initiate my first PR and
    familiarize myself with the process, mostly.
    
    * got rid of SeqLike.reverse calls when sorting by descending order
    * replaced slice(1, length) with safer and more readable tail calls
    * used foldLeft when aggregating num of docs in naive bayes code

commit 36888799b95282a5d4bbb5c4d745b2118ca96fa7
Author: Ignacio Zendejas <[email protected]>
Date:   2014-04-22T00:11:37Z

    reverted changes per feedback prior to quick pr

commit 76833d86e72e4e554272b6c376331800f9e40324
Author: Ignacio Zendejas <[email protected]>
Date:   2014-04-22T00:46:14Z

    Merge branch 'master' into sort_desc_optimizations
    
    Conflicts:
        core/src/main/scala/org/apache/spark/ui/jobs/JobProgressPage.scala
        core/src/main/scala/org/apache/spark/ui/jobs/PoolPage.scala
        
mllib/src/main/scala/org/apache/spark/mllib/api/python/PythonMLLibAPI.scala

----


---
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.
---

Reply via email to