Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/21156#discussion_r200947380
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoinExec.scala
---
@@ -76,8 +76,36 @@ case class SortMergeJoinExec(
s"${getClass.getSimpleName} should not take $x as the JoinType")
}
- override def requiredChildDistribution: Seq[Distribution] =
- HashClusteredDistribution(leftKeys) ::
HashClusteredDistribution(rightKeys) :: Nil
+ private def avoidShuffleIfPossible(
+ joinKeys: Seq[Expression],
+ expressions: Seq[Expression]): Seq[Distribution] = {
+ val indices = expressions.map(x =>
joinKeys.indexWhere(_.semanticEquals(x)))
--- End diff --
yes, you're right, thanks.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]