You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yuming Wang (Jira)" <ji...@apache.org> on 2022/08/20 22:42:00 UTC

[jira] [Comment Edited] (SPARK-39915) Dataset.repartition(N) may not create N partitions

    [ https://issues.apache.org/jira/browse/SPARK-39915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17582402#comment-17582402 ] 

Yuming Wang edited comment on SPARK-39915 at 8/20/22 10:41 PM:
---------------------------------------------------------------

The reason is that it will return empty local relation since SPARK-35442:
https://github.com/apache/spark/blob/a077701d4cc36a9a6ce898ddd3b4e5fd506f6162/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/PropagateEmptyRelation.scala#L129-L130

cc [~ulysses]


was (Author: q79969786):
The reason is that it will return empty local relation since SPARK-35455:
https://github.com/apache/spark/blob/a077701d4cc36a9a6ce898ddd3b4e5fd506f6162/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/PropagateEmptyRelation.scala#L129-L130

cc [~ulysses]

> Dataset.repartition(N) may not create N partitions
> --------------------------------------------------
>
>                 Key: SPARK-39915
>                 URL: https://issues.apache.org/jira/browse/SPARK-39915
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.3.0
>            Reporter: Shixiong Zhu
>            Priority: Major
>
> Looks like there is a behavior change in Dataset.repartition in 3.3.0. For example, `spark.range(10, 0).repartition(5).rdd.getNumPartitions` returns 5 in Spark 3.2.0, but 0 in Spark 3.3.0.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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