diff options
author | DoingDone9 <799203320@qq.com> | 2014-11-14 14:28:06 -0800 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2014-11-14 14:28:19 -0800 |
commit | f8810b6a572f314ab0b88899172d8fa2b78e014f (patch) | |
tree | 3e2404f731a563be07ee89a773c7dc6331318fc8 /sql/catalyst | |
parent | d90ddf12b6bea2162e982e800c96d2c94f66b347 (diff) | |
download | spark-f8810b6a572f314ab0b88899172d8fa2b78e014f.tar.gz spark-f8810b6a572f314ab0b88899172d8fa2b78e014f.tar.bz2 spark-f8810b6a572f314ab0b88899172d8fa2b78e014f.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.
(cherry picked from commit 0cbdb01e1c817e71c4f80de05c4e5bb11510b368)
Signed-off-by: Michael Armbrust <michael@databricks.com>
Diffstat (limited to 'sql/catalyst')
-rw-r--r-- | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala | 3 |
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 |