Skip to content

Commit

Permalink
[SPARK-4333][SQL] Correctly log number of iterations in RuleExecutor
Browse files Browse the repository at this point in the history
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 <799203320@qq.com>

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.
  • Loading branch information
pzzs authored and marmbrus committed Nov 14, 2014
1 parent f5f757e commit 0cbdb01
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
}

if (curPlan.fastEquals(lastPlan)) {
logTrace(s"Fixed point reached for batch ${batch.name} after $iteration iterations.")
logTrace(
s"Fixed point reached for batch ${batch.name} after ${iteration - 1} iterations.")
continue = false
}
lastPlan = curPlan
Expand Down

0 comments on commit 0cbdb01

Please sign in to comment.