Skip to content

Commit 6697928

Browse files
committed
addressed review comment
1 parent 9528ccc commit 6697928

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,15 +207,17 @@ trait CodegenSupport extends SparkPlan {
207207
throw new UnsupportedOperationException
208208
}
209209

210-
/*
210+
/**
211211
* for optimization to suppress shouldStop() in a loop of WholeStageCodegen
212+
*
213+
* isShouldStopRequired: require to insert shouldStop() into the loop if true
212214
*/
213-
// true: require to insert shouldStop() into a loop
214-
protected var shouldStopRequired: Boolean = false
215-
216215
def isShouldStopRequired: Boolean = {
217216
shouldStopRequired || (this.parent != null && this.parent.isShouldStopRequired)
218217
}
218+
219+
// set true if doConsume() inserts append() method that requires shouldStop() in the loop
220+
protected var shouldStopRequired: Boolean = false
219221
}
220222

221223

0 commit comments

Comments
 (0)