Github user felixcheung commented on the issue:

    https://github.com/apache/spark/pull/16739
  
    @gatorsmile thanks for commenting. `coalesce` currently accept a number 
even if it is larger than the current number of partitions - I guess we didn't 
want to throw exeception in that case?
    
    but, since you are here, do you know why we see this behavior
    ```
    df2 <- repartition(df1, 10)
    expect_equal(getNumPartitions(df2), 10) <-- right after repartition the 
number of partition is greater than the original numSlices
    expect_equal(getNumPartitions(coalesce(df2, 13)), 5) <-- but coalesce after 
repartition it can't go beyond 5
    ```
    
    Shouldn't I allow to set partition to 5 < n < 10, since I just 
`repartition(10)`?


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

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

Reply via email to