You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2020/01/31 19:45:00 UTC
[jira] [Commented] (SPARK-30036) REPARTITION hint dose not work
with order by
[ https://issues.apache.org/jira/browse/SPARK-30036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17027779#comment-17027779 ]
Dongjoon Hyun commented on SPARK-30036:
---------------------------------------
This is reverted via [https://github.com/apache/spark/commit/a2de20c0e6857653de63f46052935784be87d34f]
> REPARTITION hint dose not work with order by
> --------------------------------------------
>
> Key: SPARK-30036
> URL: https://issues.apache.org/jira/browse/SPARK-30036
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 3.0.0
> Reporter: Jackey Lee
> Assignee: Jackey Lee
> Priority: Major
> Fix For: 3.0.0
>
>
> Example SQL: select /*+ REPARTITION(2) */ * from test order by a
> == Physical Plan ==
> *(1) Sort [a#0 ASC NULLS FIRST], true, 0
> +- Exchange rangepartitioning(a#0 ASC NULLS FIRST, 2), true, [id=#11]
> +- Exchange RoundRobinPartitioning(3)
> +- Scan hive default.test [a#0, b#1], HiveTableRelation `default`.`test`, org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, [a#0, b#1|#0, b#1]
> EnsureRequirements adds ShuffleExchangeExec (RangePartitioning) after Sort if RoundRobinPartitioning behinds it. This will cause 2 shuffles, and the number of partitions in the final stage is not the number specified by RoundRobinPartitioning.
> This patch will add a new rule to change RoundRobinPartitioning to RangePartitioning rather than add new ShuffleExchangeExec.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org