[ 
https://issues.apache.org/jira/browse/SPARK-8893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apache Spark reassigned SPARK-8893:
-----------------------------------

    Assignee:     (was: Apache Spark)

> Require positive partition counts in RDD.repartition
> ----------------------------------------------------
>
>                 Key: SPARK-8893
>                 URL: https://issues.apache.org/jira/browse/SPARK-8893
>             Project: Spark
>          Issue Type: Improvement
>    Affects Versions: 1.4.0
>            Reporter: Daniel Darabos
>            Priority: Trivial
>
> What does {{sc.parallelize(1 to 3).repartition(p).collect}} return? I would 
> expect {{Array(1, 2, 3)}} regardless of {{p}}. But if {{p}} < 1, it returns 
> {{Array()}}. I think instead it should throw an {{IllegalArgumentException}}.
> I think the case is pretty clear for {{p}} < 0. But the behavior for {{p}} = 
> 0 is also error prone. In fact that's how I found this strange behavior. I 
> used {{rdd.repartition(a/b)}} with positive {{a}} and {{b}}, but {{a/b}} was 
> rounded down to zero and the results surprised me. I'd prefer an exception 
> instead of unexpected (corrupt) results.
> I'm happy to send a pull request for this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to