@@ -55,9 +55,9 @@ case class ReduceNumShufflePartitions(conf: SQLConf) extends Rule[SparkPlan] {
5555
5656 override def apply (plan : SparkPlan ): SparkPlan = {
5757 val shuffleMetrics : Seq [MapOutputStatistics ] = plan.collect {
58- case fragment : ShuffleQueryStageExec =>
59- val metricsFuture = fragment .mapOutputStatisticsFuture
60- assert(metricsFuture.isCompleted, " ShuffleQueryFragment should already be ready" )
58+ case stage : ShuffleQueryStageExec =>
59+ val metricsFuture = stage .mapOutputStatisticsFuture
60+ assert(metricsFuture.isCompleted, " ShuffleQueryStageExec should already be ready" )
6161 ThreadUtils .awaitResult(metricsFuture, Duration .Zero )
6262 }
6363
@@ -88,7 +88,7 @@ case class ReduceNumShufflePartitions(conf: SQLConf) extends Rule[SparkPlan] {
8888
8989 /**
9090 * Estimates partition start indices for post-shuffle partitions based on
91- * mapOutputStatistics provided by all pre-shuffle fragments .
91+ * mapOutputStatistics provided by all pre-shuffle stages .
9292 */
9393 // visible for testing.
9494 private [sql] def estimatePartitionStartIndices (
@@ -112,7 +112,7 @@ case class ReduceNumShufflePartitions(conf: SQLConf) extends Rule[SparkPlan] {
112112 s " advisoryTargetPostShuffleInputSize: $advisoryTargetPostShuffleInputSize, " +
113113 s " targetPostShuffleInputSize $targetPostShuffleInputSize. " )
114114
115- // Make sure we do get the same number of pre-shuffle partitions for those fragments .
115+ // Make sure we do get the same number of pre-shuffle partitions for those stages .
116116 val distinctNumPreShufflePartitions =
117117 mapOutputStatistics.map(stats => stats.bytesByPartitionId.length).distinct
118118 // The reason that we are expecting a single value of the number of pre-shuffle partitions
@@ -135,7 +135,7 @@ case class ReduceNumShufflePartitions(conf: SQLConf) extends Rule[SparkPlan] {
135135
136136 var i = 0
137137 while (i < numPreShufflePartitions) {
138- // We calculate the total size of ith pre-shuffle partitions from all pre-shuffle fragments .
138+ // We calculate the total size of ith pre-shuffle partitions from all pre-shuffle stages .
139139 // Then, we add the total size to postShuffleInputSize.
140140 var nextShuffleInputSize = 0L
141141 var j = 0
0 commit comments