Skip to content

Commit

Permalink
do not change hash shuffle
Browse files Browse the repository at this point in the history
  • Loading branch information
lgbo-ustc committed Dec 6, 2024
1 parent c05c95e commit 864930c
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,6 @@ case class RemoveDuplicatedColumns(session: SparkSession) extends Rule[SparkPlan
val newChildren = hashAgg.children.map(visitPlan)
val newHashAgg = uniqueHashAggregateColumns(hashAgg)
newHashAgg.withNewChildren(newChildren)
case shuffle @ ColumnarShuffleExchangeExec(
HashPartitioning(hashExpressions, partitionNum),
_,
_,
_,
_) =>
val newChildren = shuffle.children.map(visitPlan)
val uniqueHashExpressions = uniqueExpressions(hashExpressions)
if (uniqueHashExpressions.length != hashExpressions.length) {
shuffle
.copy(outputPartitioning = HashPartitioning(uniqueHashExpressions, partitionNum))
.withNewChildren(newChildren)
} else {
shuffle.withNewChildren(newChildren)
}
case _ =>
plan.withNewChildren(plan.children.map(visitPlan))
}
Expand Down

0 comments on commit 864930c

Please sign in to comment.