You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/12/22 00:32:33 UTC

[GitHub] [spark] Eric5553 opened a new pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Eric5553 opened a new pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977
 
 
   ### What changes were proposed in this pull request?
   Enhance RuleExecutor strategy to take different actions when exceeding max iterations. And raise exception if analyzer exceed max iterations.
   
   ### Why are the changes needed?
   Currently, both analyzer and optimizer just log warning message if rule execution exceed max iterations. They should have different behavior. Analyzer should raise exception to indicates logical plan resolve failed, while optimizer just log warning to keep the current plan. This is more feasible after SPARK-30138 was introduced.
   
   
   ### Does this PR introduce any user-facing change?
   No
   
   
   ### How was this patch tested?
   AnalyzerRuleStrategySuite added to test this change.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572181552
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572180808
 
 
   **[Test build #116305 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/116305/testReport)** for PR 26977 at commit [`259d12d`](https://github.com/apache/spark/commit/259d12dc2a3b3e15d2865a6045ee6bb111b97b46).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r361798780
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
 ##########
 @@ -45,16 +45,23 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
    * An execution strategy for rules that indicates the maximum number of executions. If the
    * execution reaches fix point (i.e. converge) before maxIterations, it will stop.
    */
-  abstract class Strategy { def maxIterations: Int }
+  abstract class Strategy {
+
+    /** The maximum number of executions. */
+    def maxIterations: Int
+
+    /** Whether to throw exception when exceeding the maximum number. */
+    def errorOnExceed: Boolean
 
 Review comment:
   > Why did you add this in not `RuleExecutor` but `Strategy`?
   
   @maropu The setting `SQLConf.ANALYZER_MAX_ITERATIONS` only controls a subset of Analyzer Rule batches (Hints, Substitution, Resolution and Cleanup). For other Batches with `Once` strategy, the original RuleExecutor logic will not raise exception or log warning. Which means within Analyzer, it will take different actions for different Batches/Strategy. So I think the `errorOnExceed` behavior is more like binding with maxIteration in Strategy. By doing this, we could have finer granularity to support the feature and provide better flexibility to control behaviors for different batches in the future. Thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572043852
 
 
   Merged build finished. Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572055816
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/21097/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583979373
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118108/
   Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584188827
 
 
   Thank you all !!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584001074
 
 
   Merged build finished. Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583950334
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583943863
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] maropu commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r364068515
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisTest.scala
 ##########
 @@ -47,6 +47,19 @@ trait AnalysisTest extends PlanTest {
     }
   }
 
+  protected def makeAnalyzerWithConf(conf: SQLConf): Analyzer = {
 
 Review comment:
   We cannot test it with `getAnalyzer()` and `withSQLConf` in AnalysisSuite (we need this helper method?)?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] maropu commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r364068681
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ##########
 @@ -169,7 +169,7 @@ class Analyzer(
 
   def resolver: Resolver = conf.resolver
 
-  protected val fixedPoint = FixedPoint(maxIterations)
 
 Review comment:
   Can you leave some comments here about why we need this change?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] maropu commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r364102794
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
 ##########
 @@ -45,16 +45,23 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
    * An execution strategy for rules that indicates the maximum number of executions. If the
    * execution reaches fix point (i.e. converge) before maxIterations, it will stop.
    */
-  abstract class Strategy { def maxIterations: Int }
+  abstract class Strategy {
+
+    /** The maximum number of executions. */
+    def maxIterations: Int
+
+    /** Whether to throw exception when exceeding the maximum number. */
+    def errorOnExceed: Boolean
 
 Review comment:
   Ur, I see. Thanks. Since this method is used only once now in `AnalysisSuite`, can you move this into `AnaysisSuite`? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584002488
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22901/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] maropu commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r361786034
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
 ##########
 @@ -45,16 +45,23 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
    * An execution strategy for rules that indicates the maximum number of executions. If the
    * execution reaches fix point (i.e. converge) before maxIterations, it will stop.
    */
-  abstract class Strategy { def maxIterations: Int }
+  abstract class Strategy {
+
+    /** The maximum number of executions. */
+    def maxIterations: Int
+
+    /** Whether to throw exception when exceeding the maximum number. */
+    def errorOnExceed: Boolean
 
 Review comment:
   Why did you add this in not `RuleExecutor` but `Strategy`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583959081
 
 
   **[Test build #118116 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118116/testReport)** for PR 26977 at commit [`bff75bc`](https://github.com/apache/spark/commit/bff75bc6e2e877c08113062dc471458caa5cb996).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572043860
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/116303/
   Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] gatorsmile commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
gatorsmile commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583949513
 
 
   add to whitelist

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583943865
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22873/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583950334
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584000802
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118130/
   Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583957724
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22881/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572055807
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572043808
 
 
   **[Test build #116303 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/116303/testReport)** for PR 26977 at commit [`ab82c41`](https://github.com/apache/spark/commit/ab82c4136144e3bd2b00ce94e87927f7e9eb93f9).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584001102
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118112/
   Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583702269
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r364095962
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisTest.scala
 ##########
 @@ -47,6 +47,19 @@ trait AnalysisTest extends PlanTest {
     }
   }
 
+  protected def makeAnalyzerWithConf(conf: SQLConf): Analyzer = {
 
 Review comment:
   @maropu The strategy field `fixedPoint` of Analyzer/Optimizer is determined when analyzer/optimizer initialized, thus SQLConf will not affect their behavior during runtime. `getAnalyzer()` only support makeAnalyzer with CASE_SENSITIVE config, while I think adding more config such as ANALYZER_MAX_ITERATIONS to `getAnalyzer()` will be too specific. That’s why I introduced this helper method with SQLConf input parameter, which will also support future test case requirements like ANALYZER_MAX_ITERATIONS does. Thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r376695166
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
 ##########
 @@ -156,7 +163,7 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
           // Only log if this is a rule that is supposed to run more than once.
           if (iteration != 2) {
             val message = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}"
-            if (Utils.isTesting) {
+            if (Utils.isTesting || batch.strategy.errorOnExceed) {
               throw new TreeNodeException(curPlan, message, null)
 
 Review comment:
   I see, thanks for the clarification. :-)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583943676
 
 
   **[Test build #118108 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118108/testReport)** for PR 26977 at commit [`cdc4879`](https://github.com/apache/spark/commit/cdc48795b8ad39359186830a7cc0c5be3dc169aa).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583714294
 
 
   Merged build finished. Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584004570
 
 
   **[Test build #118141 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118141/testReport)** for PR 26977 at commit [`bff75bc`](https://github.com/apache/spark/commit/bff75bc6e2e877c08113062dc471458caa5cb996).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-569424295
 
 
   > > If the analyzer hits max iteration, and the plan is resolved, shall we log warning or fail?
   > 
   > in this case, keep the existing behavior?
   
   Sure, I've reverted the code to keep existing behavior for this case. Thanks for review! @gatorsmile 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583999198
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584001082
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118116/
   Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583957720
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r376865058
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
 ##########
 @@ -155,8 +168,14 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
         if (iteration > batch.strategy.maxIterations) {
           // Only log if this is a rule that is supposed to run more than once.
           if (iteration != 2) {
-            val message = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}"
-            if (Utils.isTesting) {
+            val message = batch.strategy.maxIterationsSetting match {
 
 Review comment:
   nit:
   ```
   val endingMsg = if (batch.strategy.maxIterationsSetting == null) {
     "."
   } else {
     ", please set '${setting}' to a larget value"
   }
   val message = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}$endingMsg"
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] viirya commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r360737052
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ##########
 @@ -169,7 +169,7 @@ class Analyzer(
 
   def resolver: Resolver = conf.resolver
 
-  protected val fixedPoint = FixedPoint(maxIterations)
+  protected val fixedPoint = FixedPoint(maxIterations, errorOnExceed = true)
 
 Review comment:
   > Analyzer should raise exception to indicates logical plan resolve failed, while optimizer just log warning to keep the current plan. 
   
   Does exceeding max iteration indicate analyzer fails logical plan resolving? Doesn't it just mean the plan is not fixed after max iterations? It sounds not equal.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-568576122
 
 
   Can one of the admins verify this patch?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583714294
 
 
   Merged build finished. Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584000766
 
 
   **[Test build #118130 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118130/testReport)** for PR 26977 at commit [`bff75bc`](https://github.com/apache/spark/commit/bff75bc6e2e877c08113062dc471458caa5cb996).
    * This patch **fails due to an unknown error code, -9**.
    * This patch merges cleanly.
    * This patch adds no public classes.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583732236
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118064/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584129433
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118141/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583702270
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22822/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572181552
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584002476
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] gatorsmile commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
gatorsmile commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r376694885
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
 ##########
 @@ -156,7 +163,7 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
           // Only log if this is a rule that is supposed to run more than once.
           if (iteration != 2) {
             val message = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}"
-            if (Utils.isTesting) {
+            if (Utils.isTesting || batch.strategy.errorOnExceed) {
               throw new TreeNodeException(curPlan, message, null)
 
 Review comment:
   We need a clear message for end users. Usability is more important. 
   
   Regarding the implementation, I think we should avoid over-engineering. Just make it simple. Adding the message postfix in abstract class Strategy looks fine to me.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583715970
 
 
   **[Test build #118064 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118064/testReport)** for PR 26977 at commit [`c80773f`](https://github.com/apache/spark/commit/c80773fddc00dc4fefb93e94d057ba880c5d0eee).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r360743823
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/AnalyzerRuleStrategySuite.scala
 ##########
 @@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql
+
+import org.apache.spark.{LocalSparkContext, SparkConf, SparkContext, SparkFunSuite}
+import org.apache.spark.sql.catalyst.errors.TreeNodeException
+import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
+import org.apache.spark.sql.internal.SQLConf
+import org.apache.spark.sql.test.TestSparkSession
+
+class AnalyzerRuleStrategySuite extends SparkFunSuite with LocalSparkContext {
 
 Review comment:
   Sure, I'll give a try. Thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583950339
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22877/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-579141693
 
 
   @cloud-fan @viirya @gatorsmile Would you please revisit the changes, thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r376864785
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
 ##########
 @@ -155,8 +168,14 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
         if (iteration > batch.strategy.maxIterations) {
           // Only log if this is a rule that is supposed to run more than once.
           if (iteration != 2) {
-            val message = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}"
-            if (Utils.isTesting) {
+            val message = batch.strategy.maxIterationsSetting match {
+              case setting: String if setting != null =>
+                s"Max iterations (${iteration - 1}) reached for batch ${batch.name}, " +
+                  s"increasing the value of '${setting}'."
 
 Review comment:
   nit: `please set '${setting}' to a larget value`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] gatorsmile commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
gatorsmile commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583702337
 
 
   LGTM except a comment about the message

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583814383
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118084/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584002476
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583950063
 
 
   **[Test build #118112 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118112/testReport)** for PR 26977 at commit [`cdc4879`](https://github.com/apache/spark/commit/cdc48795b8ad39359186830a7cc0c5be3dc169aa).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572055816
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/21097/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583702270
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22822/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] maropu commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r364198845
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
 ##########
 @@ -45,16 +45,23 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
    * An execution strategy for rules that indicates the maximum number of executions. If the
    * execution reaches fix point (i.e. converge) before maxIterations, it will stop.
    */
-  abstract class Strategy { def maxIterations: Int }
+  abstract class Strategy {
+
+    /** The maximum number of executions. */
+    def maxIterations: Int
+
+    /** Whether to throw exception when exceeding the maximum number. */
+    def errorOnExceed: Boolean
 
 Review comment:
   (Oh, I noticed now that I left the comment in the wrong position, sorry...)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583715970
 
 
   **[Test build #118064 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118064/testReport)** for PR 26977 at commit [`c80773f`](https://github.com/apache/spark/commit/c80773fddc00dc4fefb93e94d057ba880c5d0eee).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584001074
 
 
   Merged build finished. Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572055285
 
 
   **[Test build #116305 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/116305/testReport)** for PR 26977 at commit [`259d12d`](https://github.com/apache/spark/commit/259d12dc2a3b3e15d2865a6045ee6bb111b97b46).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572028688
 
 
   **[Test build #116303 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/116303/testReport)** for PR 26977 at commit [`ab82c41`](https://github.com/apache/spark/commit/ab82c4136144e3bd2b00ce94e87927f7e9eb93f9).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572181567
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/116305/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583800690
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-568576122
 
 
   Can one of the admins verify this patch?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572029199
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/21094/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] gatorsmile commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
gatorsmile commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583702344
 
 
   cc @cloud-fan @maryannxue 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583715594
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583814380
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583979367
 
 
   Merged build finished. Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572028688
 
 
   **[Test build #116303 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/116303/testReport)** for PR 26977 at commit [`ab82c41`](https://github.com/apache/spark/commit/ab82c4136144e3bd2b00ce94e87927f7e9eb93f9).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r364234198
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisSuite.scala
 ##########
 @@ -737,4 +756,23 @@ class AnalysisSuite extends AnalysisTest with Matchers {
       CollectMetrics("evt1", count :: Nil, tblB))
     assertAnalysisError(query, "Multiple definitions of observed metrics" :: "evt1" :: Nil)
   }
+
+  test("Analysis exceed max iterations") {
+    // RuleExecutor only throw exception or log warning when the rule is supposed to run
+    // more than once.
+    val maxIterations = 2
+    val conf = new SQLConf().copy(SQLConf.ANALYZER_MAX_ITERATIONS -> maxIterations)
 
 Review comment:
   Yeah, I see. It's more concise.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572043860
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/116303/
   Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583943676
 
 
   **[Test build #118108 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118108/testReport)** for PR 26977 at commit [`cdc4879`](https://github.com/apache/spark/commit/cdc48795b8ad39359186830a7cc0c5be3dc169aa).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583814383
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118084/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583715594
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583998828
 
 
   **[Test build #118130 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118130/testReport)** for PR 26977 at commit [`bff75bc`](https://github.com/apache/spark/commit/bff75bc6e2e877c08113062dc471458caa5cb996).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583702269
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584002488
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22901/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584000769
 
 
   **[Test build #118116 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118116/testReport)** for PR 26977 at commit [`bff75bc`](https://github.com/apache/spark/commit/bff75bc6e2e877c08113062dc471458caa5cb996).
    * This patch **fails due to an unknown error code, -9**.
    * This patch merges cleanly.
    * This patch adds no public classes.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] gatorsmile commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
gatorsmile commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r376839314
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
 ##########
 @@ -155,8 +162,9 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
         if (iteration > batch.strategy.maxIterations) {
           // Only log if this is a rule that is supposed to run more than once.
           if (iteration != 2) {
-            val message = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}"
-            if (Utils.isTesting) {
+            val message = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}, " +
+              s"increasing the value of '${SQLConf.ANALYZER_MAX_ITERATIONS.key}'."
 
 Review comment:
   Actually, this change is not right. The optimizer will also issue this message. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-575959055
 
 
   @cloud-fan @viirya @gatorsmile  Would you please revisit the changes, thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583958401
 
 
   @cloud-fan Thanks for the review! bff75bc6e2e877c08113062dc471458caa5cb996 was to address the comments.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572181567
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/116305/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572032278
 
 
   @maropu Thanks for the detailed review! 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-568575485
 
 
   Can one of the admins verify this patch?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583732108
 
 
   **[Test build #118064 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118064/testReport)** for PR 26977 at commit [`c80773f`](https://github.com/apache/spark/commit/c80773fddc00dc4fefb93e94d057ba880c5d0eee).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583943863
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583957720
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584001082
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118116/
   Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584001102
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118112/
   Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584001941
 
 
   retest this please

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584000802
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118130/
   Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583950339
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22877/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583998828
 
 
   **[Test build #118130 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118130/testReport)** for PR 26977 at commit [`bff75bc`](https://github.com/apache/spark/commit/bff75bc6e2e877c08113062dc471458caa5cb996).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-575959055
 
 
   @cloud-fan @viirya @gatorsmile  Would you please revisit the changes, thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584001096
 
 
   Merged build finished. Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583999198
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r376858458
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
 ##########
 @@ -155,8 +162,9 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
         if (iteration > batch.strategy.maxIterations) {
           // Only log if this is a rule that is supposed to run more than once.
           if (iteration != 2) {
-            val message = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}"
-            if (Utils.isTesting) {
+            val message = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}, " +
+              s"increasing the value of '${SQLConf.ANALYZER_MAX_ITERATIONS.key}'."
 
 Review comment:
   Opps, sorry.
   I updated the logic in cdc48795b8ad39359186830a7cc0c5be3dc169aa. Extend abstract class `Strategy` to support setting different hint setting key in Analyzer or Optimizer.
   Would you please take time to review? Thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan closed pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583800692
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22849/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583702180
 
 
   **[Test build #118055 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118055/testReport)** for PR 26977 at commit [`259d12d`](https://github.com/apache/spark/commit/259d12dc2a3b3e15d2865a6045ee6bb111b97b46).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572055285
 
 
   **[Test build #116305 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/116305/testReport)** for PR 26977 at commit [`259d12d`](https://github.com/apache/spark/commit/259d12dc2a3b3e15d2865a6045ee6bb111b97b46).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-568575485
 
 
   Can one of the admins verify this patch?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572055807
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584184628
 
 
   This needs to be in 3.0. In Spark 2.4 the analyzer max iteration was controlled by `SQLConf.OPTIMIZER_MAX_ITERATIONS`. In 3.0, we add a new config for it, and it's possible that existing queries set `SQLConf.OPTIMIZER_MAX_ITERATIONS` to a large value and they fail analysis after upgrading to Spark 3.0.
   
   With this PR, they can get a clear error message to set the new config.
   
   Thanks, merging to master/3.0!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] maropu commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
maropu commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572026541
 
 
   ok to test

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583996484
 
 
   retest this please 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584000791
 
 
   Merged build finished. Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583800690
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] gatorsmile commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
gatorsmile commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583702054
 
 
   retest this please

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583800616
 
 
   **[Test build #118084 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118084/testReport)** for PR 26977 at commit [`177adc8`](https://github.com/apache/spark/commit/177adc8d55bfb6f2b81854317990adedfed3a875).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r364096684
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ##########
 @@ -169,7 +169,7 @@ class Analyzer(
 
   def resolver: Resolver = conf.resolver
 
-  protected val fixedPoint = FixedPoint(maxIterations)
 
 Review comment:
   @maropu Sure, added in commit 8a20a5c622d4b52980036c620d7e848925e43f38. Thanks for point it out!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584128335
 
 
   **[Test build #118141 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118141/testReport)** for PR 26977 at commit [`bff75bc`](https://github.com/apache/spark/commit/bff75bc6e2e877c08113062dc471458caa5cb996).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583714300
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118055/
   Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-568542023
 
 
   @cloud-fan Good catch!
   
   IMO, literally the description `The max number of iterations the analyzer runs.` infers we should try to iterate the plan to the maxIteration inclusively with no error or warning. But the current code will raise exception or log warning at the max iteration even the plan is fixed. This apply to both analyzer & optimizer.
   
   I tried to fix it in 015e97218b60da907e49ad9bebb208a276a13354, and also added a corresponding test case in RuleExecutorSuite. The case will fail(raise exception) with original code.
   
   What's your opinion? Please correct me if I'm wrong. Thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583732234
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583814266
 
 
   **[Test build #118084 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118084/testReport)** for PR 26977 at commit [`177adc8`](https://github.com/apache/spark/commit/177adc8d55bfb6f2b81854317990adedfed3a875).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584129425
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572029199
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/21094/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583814380
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583732236
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118064/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583715597
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22830/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584129433
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118141/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583979185
 
 
   **[Test build #118108 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118108/testReport)** for PR 26977 at commit [`cdc4879`](https://github.com/apache/spark/commit/cdc48795b8ad39359186830a7cc0c5be3dc169aa).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds the following public classes _(experimental)_:
     * `  case class FixedPoint(`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572029192
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583979373
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118108/
   Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583959081
 
 
   **[Test build #118116 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118116/testReport)** for PR 26977 at commit [`bff75bc`](https://github.com/apache/spark/commit/bff75bc6e2e877c08113062dc471458caa5cb996).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r361798780
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
 ##########
 @@ -45,16 +45,23 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
    * An execution strategy for rules that indicates the maximum number of executions. If the
    * execution reaches fix point (i.e. converge) before maxIterations, it will stop.
    */
-  abstract class Strategy { def maxIterations: Int }
+  abstract class Strategy {
+
+    /** The maximum number of executions. */
+    def maxIterations: Int
+
+    /** Whether to throw exception when exceeding the maximum number. */
+    def errorOnExceed: Boolean
 
 Review comment:
   > Why did you add this in not `RuleExecutor` but `Strategy`?
   
   @maropu The setting `SQLConf.ANALYZER_MAX_ITERATIONS` only controls a subset of Analyzer Rule batches (Hints, Substitution, Resolution and Cleanup). For other Rules with `Once` strategy, the original RuleExecutor logic will not raise exception or log warning. Which means within Analyzer, it will take different actions for different Batches/Strategy. So I think the `errorOnExceed` behavior is more like binding with maxIteration in Strategy. By doing this, we could have finer granularity to support the feature and provide better flexibility to control behaviors for different batches in the future. Thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] maropu commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r360736330
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/AnalyzerRuleStrategySuite.scala
 ##########
 @@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql
+
+import org.apache.spark.{LocalSparkContext, SparkConf, SparkContext, SparkFunSuite}
+import org.apache.spark.sql.catalyst.errors.TreeNodeException
+import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
+import org.apache.spark.sql.internal.SQLConf
+import org.apache.spark.sql.test.TestSparkSession
+
+class AnalyzerRuleStrategySuite extends SparkFunSuite with LocalSparkContext {
 
 Review comment:
   Can you write tests in `AnalysisSuite` without a Spark session?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583999206
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22893/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583714300
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118055/
   Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-570482236
 
 
   @cloud-fan @maropu @viirya Would you please help take a look? Thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-568235957
 
 
   @cloud-fan @dongjoon-hyun @HyukjinKwon
   Would you please help review, thanks! 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584000791
 
 
   Merged build finished. Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583950063
 
 
   **[Test build #118112 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118112/testReport)** for PR 26977 at commit [`cdc4879`](https://github.com/apache/spark/commit/cdc48795b8ad39359186830a7cc0c5be3dc169aa).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r360963254
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/AnalyzerRuleStrategySuite.scala
 ##########
 @@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql
+
+import org.apache.spark.{LocalSparkContext, SparkConf, SparkContext, SparkFunSuite}
+import org.apache.spark.sql.catalyst.errors.TreeNodeException
+import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
+import org.apache.spark.sql.internal.SQLConf
+import org.apache.spark.sql.test.TestSparkSession
+
+class AnalyzerRuleStrategySuite extends SparkFunSuite with LocalSparkContext {
 
 Review comment:
   @maropu I moved the test to AnalysisSuite without using Spark session in     4f3ac3ac19bdfa18bd37fe950c1b6b7412406551.  Does this looks properly? Thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583800692
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22849/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r360743776
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ##########
 @@ -169,7 +169,7 @@ class Analyzer(
 
   def resolver: Resolver = conf.resolver
 
-  protected val fixedPoint = FixedPoint(maxIterations)
+  protected val fixedPoint = FixedPoint(maxIterations, errorOnExceed = true)
 
 Review comment:
   Yeah, I see. I've updated the descriptions of PR & JIRA. Thanks for pointed it out :-)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r364131627
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisTest.scala
 ##########
 @@ -47,6 +47,19 @@ trait AnalysisTest extends PlanTest {
     }
   }
 
+  protected def makeAnalyzerWithConf(conf: SQLConf): Analyzer = {
 
 Review comment:
   @maropu I moved the helper method in commit ab82c4136144e3bd2b00ce94e87927f7e9eb93f9

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583800616
 
 
   **[Test build #118084 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118084/testReport)** for PR 26977 at commit [`177adc8`](https://github.com/apache/spark/commit/177adc8d55bfb6f2b81854317990adedfed3a875).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583943865
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22873/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-569056356
 
 
   @cloud-fan @maropu @viirya  Would you please help review the latest change? Thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583957724
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22881/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] maropu commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
maropu commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-569157486
 
 
   > Analyzer should raise exception to indicates the plan is not fixed after max iterations
   
   I'm currently not sure that this feature is useful... If a logical plan has unresolved nodes for that case, I think Spark should throw an analysis exception in `CheckAnalysis`. Do you mean that is not enough?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584000752
 
 
   **[Test build #118112 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118112/testReport)** for PR 26977 at commit [`cdc4879`](https://github.com/apache/spark/commit/cdc48795b8ad39359186830a7cc0c5be3dc169aa).
    * This patch **fails due to an unknown error code, -9**.
    * This patch merges cleanly.
    * This patch adds the following public classes _(experimental)_:
     * `  case class FixedPoint(`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572043852
 
 
   Merged build finished. Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584001096
 
 
   Merged build finished. Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] gatorsmile commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
gatorsmile commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r376687022
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
 ##########
 @@ -156,7 +163,7 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
           // Only log if this is a rule that is supposed to run more than once.
           if (iteration != 2) {
             val message = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}"
-            if (Utils.isTesting) {
+            if (Utils.isTesting || batch.strategy.errorOnExceed) {
               throw new TreeNodeException(curPlan, message, null)
 
 Review comment:
   In the message, we need to explicitly tell users how to resolve this exception. Increasing the value of SQLConf.ANALYZER_MAX_ITERATIONS.key

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r376694303
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
 ##########
 @@ -156,7 +163,7 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
           // Only log if this is a rule that is supposed to run more than once.
           if (iteration != 2) {
             val message = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}"
-            if (Utils.isTesting) {
+            if (Utils.isTesting || batch.strategy.errorOnExceed) {
               throw new TreeNodeException(curPlan, message, null)
 
 Review comment:
   IMO, here is the common logic in `RuleExecutor` to handle `errorOnExceed` strategy, which should not include specific knowledge `ANALYZER_MAX_ITERATIONS` of inheritance class `analyzer`.  This will lead to potential bug when we introduce more MAX_ITERATION setting?
   
   Maybe we can use a common phrase here like 'increasing the value of corresponding SQLConf setting'. Or an alternative way of adding a string hint field in `Strategy`, and set it in `Analyzer` together with `errorOnExceed` flag?
   
   What do you think ? @gatorsmile  Thanks a lot!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583979367
 
 
   Merged build finished. Test FAILed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584004570
 
 
   **[Test build #118141 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118141/testReport)** for PR 26977 at commit [`bff75bc`](https://github.com/apache/spark/commit/bff75bc6e2e877c08113062dc471458caa5cb996).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583999206
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22893/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583715597
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22830/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] gatorsmile commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
gatorsmile commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-569199630
 
 
   > If the analyzer hits max iteration, and the plan is resolved, shall we log warning or fail?
   
   in this case, keep the existing behavior?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572029192
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r376865165
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisSuite.scala
 ##########
 @@ -745,4 +746,27 @@ class AnalysisSuite extends AnalysisTest with Matchers {
       CollectMetrics("evt1", sumWithFilter :: Nil, testRelation),
       "aggregates with filter predicate are not allowed" :: Nil)
   }
+
+  test("Analysis exceed max iterations") {
+    // RuleExecutor only throw exception or log warning when the rule is supposed to run
+    // more than once.
+    val maxIterations = 2
+    val conf = new SQLConf().copy(SQLConf.ANALYZER_MAX_ITERATIONS -> maxIterations)
+    val testAnalyzer = new Analyzer(
+      new SessionCatalog(new InMemoryCatalog, FunctionRegistry.builtin, conf),
+      new SQLConf().copy(SQLConf.ANALYZER_MAX_ITERATIONS -> maxIterations))
 
 Review comment:
   nit: just pass `conf`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583714232
 
 
   **[Test build #118055 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118055/testReport)** for PR 26977 at commit [`259d12d`](https://github.com/apache/spark/commit/259d12dc2a3b3e15d2865a6045ee6bb111b97b46).
    * This patch **fails due to an unknown error code, -9**.
    * This patch merges cleanly.
    * This patch adds no public classes.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan edited a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
cloud-fan edited a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-568366428
 
 
   If the analyzer hits max iteration, and the plan is resolved, shall we log warning or fail?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] maropu commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r364206366
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisSuite.scala
 ##########
 @@ -737,4 +756,23 @@ class AnalysisSuite extends AnalysisTest with Matchers {
       CollectMetrics("evt1", count :: Nil, tblB))
     assertAnalysisError(query, "Multiple definitions of observed metrics" :: "evt1" :: Nil)
   }
+
+  test("Analysis exceed max iterations") {
+    // RuleExecutor only throw exception or log warning when the rule is supposed to run
+    // more than once.
+    val maxIterations = 2
+    val conf = new SQLConf().copy(SQLConf.ANALYZER_MAX_ITERATIONS -> maxIterations)
 
 Review comment:
   I think its ok to inline the analyzer like this;
   ```
     test("Analysis exceed max iterations") {
       // RuleExecutor only throw exception or log warning when the rule is supposed to run
       // more than once.
       val maxIterations = 2
       val testAnalyzer = new Analyzer(
         new SessionCatalog(new InMemoryCatalog, FunctionRegistry.builtin, conf),
         new SQLConf().copy(SQLConf.ANALYZER_MAX_ITERATIONS -> maxIterations))
   
       val plan = testRelation2.select(
         $"a" / Literal(2) as "div1",
         $"a" / $"b" as "div2",
         $"a" / $"c" as "div3",
         $"a" / $"d" as "div4",
         $"e" / $"e" as "div5")
   
       val message = intercept[TreeNodeException[LogicalPlan]] {
         testAnalyzer.execute(plan)
       }.getMessage
       assert(message.startsWith(s"Max iterations ($maxIterations) reached for batch Resolution"))
     }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] maropu commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
maropu commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-572027095
 
 
   Looks fine now. I'll leave this to the other more qualified reviewers. @cloud-fan @viirya 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583702180
 
 
   **[Test build #118055 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118055/testReport)** for PR 26977 at commit [`259d12d`](https://github.com/apache/spark/commit/259d12dc2a3b3e15d2865a6045ee6bb111b97b46).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583996484
 
 
   retest this please 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-584129425
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-568366428
 
 
   If the analyzer hits max iteration, and the plan is resolved. shall we log warning or fail?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] gatorsmile commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
gatorsmile commented on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-569199493
 
 
   @maropu I think the exception threw by CheckAnalysis is confusing to end users. The unresolved plans are not caused by the user queries. Instead, they need to increase the value of SQLConf.ANALYZER_MAX_ITERATIONS. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#issuecomment-583732234
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations

Posted by GitBox <gi...@apache.org>.
Eric5553 commented on a change in pull request #26977: [SPARK-30326][SQL] Raise exception if analyzer exceed max iterations
URL: https://github.com/apache/spark/pull/26977#discussion_r364115613
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
 ##########
 @@ -45,16 +45,23 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
    * An execution strategy for rules that indicates the maximum number of executions. If the
    * execution reaches fix point (i.e. converge) before maxIterations, it will stop.
    */
-  abstract class Strategy { def maxIterations: Int }
+  abstract class Strategy {
+
+    /** The maximum number of executions. */
+    def maxIterations: Int
+
+    /** Whether to throw exception when exceeding the maximum number. */
+    def errorOnExceed: Boolean
 
 Review comment:
   > Ur, I see. Thanks. Since this method is used only once now in `AnalysisSuite`, can you move this into `AnaysisSuite`?
   
   Sure, will do :-)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org