Ngone51 commented on a change in pull request #28226:
URL: https://github.com/apache/spark/pull/28226#discussion_r411125364
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/OptimizeSkewedJoin.scala
##########
@@ -88,9 +88,11 @@ case class OptimizeSkewedJoin(conf: SQLConf) extends
Rule[SparkPlan] {
private def targetSize(sizes: Seq[Long], medianSize: Long): Long = {
val advisorySize = conf.getConf(SQLConf.ADVISORY_PARTITION_SIZE_IN_BYTES)
val nonSkewSizes = sizes.filterNot(isSkewed(_, medianSize))
- // It's impossible that all the partitions are skewed, as we use median
size to define skew.
- assert(nonSkewSizes.nonEmpty)
- math.max(advisorySize, nonSkewSizes.sum / nonSkewSizes.length)
+ if (nonSkewSizes.isEmpty) {
Review comment:
I see, 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]