leanken commented on a change in pull request #29455:
URL: https://github.com/apache/spark/pull/29455#discussion_r473546639
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/EnsureRequirements.scala
##########
@@ -52,7 +54,15 @@ case class EnsureRequirements(conf: SQLConf) extends
Rule[SparkPlan] {
case (child, distribution) =>
val numPartitions = distribution.requiredNumPartitions
.getOrElse(conf.numShufflePartitions)
- ShuffleExchangeExec(distribution.createPartitioning(numPartitions),
child)
+
+ operator match {
+ // Ensure collectNullPartitionKeyMetrics is passed through via
instance creation
+ case shj @ ShuffledHashJoinExec(_, _, LeftAnti, BuildRight, _, _, _,
true)
+ if shj.right.fastEquals(child) =>
+ ShuffleExchangeExec(distribution.createPartitioning(numPartitions),
+ child, statSpecs = Seq(NullPartitionKeyStatisticsSpec))
+ case _ =>
ShuffleExchangeExec(distribution.createPartitioning(numPartitions), child)
+ }
Review comment:
I will look into the example you were showing, never considered this
case before, thanks.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]