Skip to content

Commit 0cbdb01

Browse files
pzzsmarmbrus
authored andcommitted
[SPARK-4333][SQL] Correctly log number of iterations in RuleExecutor
When iterator of RuleExecutor breaks, the num of iterator should be (iteration - 1) not (iteration ).Because log looks like "Fixed point reached for batch ${batch.name} after 3 iterations.", but it did 2 iterations really! Author: DoingDone9 <[email protected]> Closes apache#3180 from DoingDone9/issue_01 and squashes the following commits: 571e2ed [DoingDone9] Update RuleExecutor.scala 46514b6 [DoingDone9] When iterator of RuleExecutor breaks, the num of iterator should be iteration - 1 not iteration.
1 parent f5f757e commit 0cbdb01

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
7979
}
8080

8181
if (curPlan.fastEquals(lastPlan)) {
82-
logTrace(s"Fixed point reached for batch ${batch.name} after $iteration iterations.")
82+
logTrace(
83+
s"Fixed point reached for batch ${batch.name} after ${iteration - 1} iterations.")
8384
continue = false
8485
}
8586
lastPlan = curPlan

0 commit comments

Comments
 (0)