Skip to content

Commit 4ef81c8

Browse files
committed
address review comment
1 parent 05da9d7 commit 4ef81c8

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/SortExec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ case class SortExec(
138138
// Initialize the class member variables. This includes the instance of the Sorter and
139139
// the iterator to return sorted rows.
140140
val thisPlan = ctx.addReferenceObj("plan", this)
141-
// inline mutable state since not many Sort operations in a task
141+
// Inline mutable state since not many Sort operations in a task
142142
sorterVariable = ctx.addMutableState(classOf[UnsafeExternalRowSorter].getName, "sorter",
143143
v => s"$v = $thisPlan.createSorter();", forceInline = true)
144144
val metrics = ctx.addMutableState(classOf[TaskMetrics].getName, "metrics",

sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ case class InputAdapter(child: SparkPlan) extends UnaryExecNode with CodegenSupp
283283

284284
override def doProduce(ctx: CodegenContext): String = {
285285
// Right now, InputAdapter is only used when there is one input RDD.
286-
// inline mutable state since an InputAdapter is used once in a task for WholeStageCodegen
286+
// Inline mutable state since an InputAdapter is used once in a task for WholeStageCodegen
287287
val input = ctx.addMutableState("scala.collection.Iterator", "input", v => s"$v = inputs[0];",
288288
forceInline = true)
289289
val row = ctx.freshName("row")

sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ case class HashAggregateExec(
587587
fastHashMapClassName, groupingKeySchema, bufferSchema).generate()
588588
ctx.addInnerClass(generatedMap)
589589

590-
// inline mutable state since not many aggregation operations in a task
590+
// Inline mutable state since not many aggregation operations in a task
591591
fastHashMapTerm = ctx.addMutableState(fastHashMapClassName, "vectorizedHastHashMap",
592592
v => s"$v = new $fastHashMapClassName();", forceInline = true)
593593
ctx.addMutableState(s"java.util.Iterator<InternalRow>", "vectorizedFastHashMapIter",
@@ -597,7 +597,7 @@ case class HashAggregateExec(
597597
fastHashMapClassName, groupingKeySchema, bufferSchema).generate()
598598
ctx.addInnerClass(generatedMap)
599599

600-
// inline mutable state since not many aggregation operations in a task
600+
// Inline mutable state since not many aggregation operations in a task
601601
fastHashMapTerm = ctx.addMutableState(fastHashMapClassName, "fastHashMap",
602602
v => s"$v = new $fastHashMapClassName(" +
603603
s"$thisPlan.getTaskMemoryManager(), $thisPlan.getEmptyAggregationBuffer());",
@@ -609,7 +609,7 @@ case class HashAggregateExec(
609609
}
610610

611611
// Create a name for the iterator from the regular hash map.
612-
// inline mutable state since not many aggregation operations in a task
612+
// Inline mutable state since not many aggregation operations in a task
613613
val iterTerm = ctx.addMutableState(classOf[KVIterator[UnsafeRow, UnsafeRow]].getName,
614614
"mapIter", forceInline = true)
615615
// create hashMap

sql/core/src/main/scala/org/apache/spark/sql/execution/basicPhysicalOperators.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ case class SampleExec(
284284
val samplerClass = classOf[PoissonSampler[UnsafeRow]].getName
285285
val initSampler = ctx.freshName("initSampler")
286286

287-
// inline mutable state since not many Sample operations in a task
287+
// Inline mutable state since not many Sample operations in a task
288288
val sampler = ctx.addMutableState(s"$samplerClass<UnsafeRow>", "sampleReplace",
289289
v => {
290290
val initSamplerFuncName = ctx.addNewFunction(initSampler,
@@ -371,7 +371,7 @@ case class RangeExec(range: org.apache.spark.sql.catalyst.plans.logical.Range)
371371
val ev = ExprCode("", "false", value)
372372
val BigInt = classOf[java.math.BigInteger].getName
373373

374-
// inline mutable state since not many Range operations in a task
374+
// Inline mutable state since not many Range operations in a task
375375
val taskContext = ctx.addMutableState("TaskContext", "taskContext",
376376
v => s"$v = TaskContext.get();", forceInline = true)
377377
val inputMetrics = ctx.addMutableState("InputMetrics", "inputMetrics",

sql/core/src/main/scala/org/apache/spark/sql/execution/joins/BroadcastHashJoinExec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ case class BroadcastHashJoinExec(
139139
// At the end of the task, we update the avg hash probe.
140140
val avgHashProbe = metricTerm(ctx, "avgHashProbe")
141141

142-
// inline mutable state since not many join operations in a task
142+
// Inline mutable state since not many join operations in a task
143143
val relationTerm = ctx.addMutableState(clsName, "relation",
144144
v => s"""
145145
| $v = (($clsName) $broadcast.value()).asReadOnlyCopy();

sql/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoinExec.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ case class SortMergeJoinExec(
422422
*/
423423
private def genScanner(ctx: CodegenContext): (String, String) = {
424424
// Create class member for next row from both sides.
425-
// inline mutable state since not many join operations in a task
425+
// Inline mutable state since not many join operations in a task
426426
val leftRow = ctx.addMutableState("InternalRow", "leftRow", forceInline = true)
427427
val rightRow = ctx.addMutableState("InternalRow", "rightRow", forceInline = true)
428428

@@ -440,7 +440,7 @@ case class SortMergeJoinExec(
440440
val spillThreshold = getSpillThreshold
441441
val inMemoryThreshold = getInMemoryThreshold
442442

443-
// inline mutable state since not many join operations in a task
443+
// Inline mutable state since not many join operations in a task
444444
val matches = ctx.addMutableState(clsName, "matches",
445445
v => s"$v = new $clsName($inMemoryThreshold, $spillThreshold);", forceInline = true)
446446
// Copy the left keys as class members so they could be used in next function call.
@@ -577,7 +577,7 @@ case class SortMergeJoinExec(
577577
override def needCopyResult: Boolean = true
578578

579579
override def doProduce(ctx: CodegenContext): String = {
580-
// inline mutable state since not many join operations in a task
580+
// Inline mutable state since not many join operations in a task
581581
val leftInput = ctx.addMutableState("scala.collection.Iterator", "leftInput",
582582
v => s"$v = inputs[0];", forceInline = true)
583583
val rightInput = ctx.addMutableState("scala.collection.Iterator", "rightInput",

0 commit comments

Comments
 (0)