aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorDoingDone9 <799203320@qq.com>2014-11-14 14:28:06 -0800
committerMichael Armbrust <michael@databricks.com>2014-11-14 14:28:06 -0800
commit0cbdb01e1c817e71c4f80de05c4e5bb11510b368 (patch)
tree3f7012d259724d556f88410faa320b3aeea2ec9d /sql
parentf5f757e4ed80759dc5668c63d5663651689f8da8 (diff)
downloadspark-0cbdb01e1c817e71c4f80de05c4e5bb11510b368.tar.gz
spark-0cbdb01e1c817e71c4f80de05c4e5bb11510b368.tar.bz2
spark-0cbdb01e1c817e71c4f80de05c4e5bb11510b368.zip
[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 <799203320@qq.com> Closes #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.
Diffstat (limited to 'sql')
-rw-r--r--sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
index d192b151ac..c441f0bf24 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
@@ -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