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

angerszhu updated SPARK-54414:
------------------------------
    Description: 
{code:java}
private def reorderJoinPredicates(plan: SparkPlan): SparkPlan = {
  plan match {
    case ShuffledHashJoinExec(
      leftKeys, rightKeys, joinType, buildSide, condition, left, right, isSkew) 
=>
      val (reorderedLeftKeys, reorderedRightKeys) =
        reorderJoinKeys(leftKeys, rightKeys, left.outputPartitioning, 
right.outputPartitioning)
      ShuffledHashJoinExec(reorderedLeftKeys, reorderedRightKeys, joinType, 
buildSide, condition,
        left, right, isSkew)

    case SortMergeJoinExec(leftKeys, rightKeys, joinType, condition, left, 
right, isSkew) =>
      val (reorderedLeftKeys, reorderedRightKeys) =
        reorderJoinKeys(leftKeys, rightKeys, left.outputPartitioning, 
right.outputPartitioning)
      SortMergeJoinExec(reorderedLeftKeys, reorderedRightKeys, joinType, 
condition,
        left, right, isSkew)

    case other => other
  }
} {code}
should use copy

> EnsureRequirements reorderJoinPredicates should use copy avoid missing tag
> --------------------------------------------------------------------------
>
>                 Key: SPARK-54414
>                 URL: https://issues.apache.org/jira/browse/SPARK-54414
>             Project: Spark
>          Issue Type: Task
>          Components: SQL
>    Affects Versions: 3.2.1, 4.0.1
>            Reporter: angerszhu
>            Priority: Major
>
> {code:java}
> private def reorderJoinPredicates(plan: SparkPlan): SparkPlan = {
>   plan match {
>     case ShuffledHashJoinExec(
>       leftKeys, rightKeys, joinType, buildSide, condition, left, right, 
> isSkew) =>
>       val (reorderedLeftKeys, reorderedRightKeys) =
>         reorderJoinKeys(leftKeys, rightKeys, left.outputPartitioning, 
> right.outputPartitioning)
>       ShuffledHashJoinExec(reorderedLeftKeys, reorderedRightKeys, joinType, 
> buildSide, condition,
>         left, right, isSkew)
>     case SortMergeJoinExec(leftKeys, rightKeys, joinType, condition, left, 
> right, isSkew) =>
>       val (reorderedLeftKeys, reorderedRightKeys) =
>         reorderJoinKeys(leftKeys, rightKeys, left.outputPartitioning, 
> right.outputPartitioning)
>       SortMergeJoinExec(reorderedLeftKeys, reorderedRightKeys, joinType, 
> condition,
>         left, right, isSkew)
>     case other => other
>   }
> } {code}
> should use copy



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to