You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2020/12/03 06:15:00 UTC

[jira] [Commented] (SPARK-33472) IllegalArgumentException when applying RemoveRedundantSorts before EnsureRequirements

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

Apache Spark commented on SPARK-33472:
--------------------------------------

User 'allisonwang-db' has created a pull request for this issue:
https://github.com/apache/spark/pull/30584

> IllegalArgumentException when applying RemoveRedundantSorts before EnsureRequirements
> -------------------------------------------------------------------------------------
>
>                 Key: SPARK-33472
>                 URL: https://issues.apache.org/jira/browse/SPARK-33472
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.4.8, 3.0.2, 3.1.0
>            Reporter: Allison Wang
>            Assignee: Allison Wang
>            Priority: Major
>             Fix For: 2.4.8, 3.0.2, 3.1.0
>
>
> `RemoveRedundantSorts` rule uses SparkPlan's `outputPartitioning` to check whether a sort node is redundant. Currently, it is added before `EnsureRequirements`. Since `PartitioningCollection` requires left and right partitioning to have the same number of partitions, which is not necessarily true before applying `EnsureRequirements`, the rule can fail with the following exception:
> {{IllegalArgumentException: requirement failed: PartitioningCollection requires all of its partitionings have the same numPartitions.}}
> We should switch the order between these two rules to satisfy the requirement when instantiating `PartitioningCollection`.
>  



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