You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2016/03/15 06:56:07 UTC

[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

GitHub user gatorsmile opened a pull request:

    https://github.com/apache/spark/pull/11714

    [SPARK-13891] [SQL] [TEST] Issue Exceptions when Hitting the Max Iteration Limit in Optimizer and Analyzer

    #### What changes were proposed in this pull request?
    
    This PR is to issue an exception in the unit tests of Spark SQL when hitting the max iteration limit. Then, we can catch the infinite loop bugs in Analyzer and Optimizer.
    
    Will submit separate PRs to fix the root cause that trigger these exceptions. Thanks!
    
    cc @marmbrus 
    
    #### How was this patch tested?
    
    Note: this PR will trigger a lot of failures due to the uncaught issues. For example, one of the issues has been found in https://github.com/apache/spark/pull/11682
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gatorsmile/spark maxIterationException

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/11714.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #11714
    
----
commit 797aabb275af8e7d1208341bcd78bcc41a1d2191
Author: gatorsmile <ga...@gmail.com>
Date:   2016-03-15T05:34:33Z

    When doing the test, issue an exception if hitting the max iteration.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196838065
  
    @rxin Yeah. There is another one issue. In the predicate push down, we should not push down any predicate if the child's Constraints already contain them. Will submit a PR tonight.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r56119362
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala ---
    @@ -98,7 +107,8 @@ 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) {
    -            logInfo(s"Max iterations (${iteration - 1}) reached for batch ${batch.name}")
    +            val msg = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}"
    +            if (batch.strategy.throws) throw new SparkException(msg) else logTrace(msg)
    --- End diff --
    
    AnalysisException?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196722804
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53176/
    Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196698060
  
    **[Test build #53173 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53173/consoleFull)** for PR 11714 at commit [`f351362`](https://github.com/apache/spark/commit/f351362475f4fd9382f36eb60150cad93aa8e864).
     * This patch **fails to build**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-200344288
  
    **[Test build #53936 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53936/consoleFull)** for PR 11714 at commit [`1a59fcf`](https://github.com/apache/spark/commit/1a59fcf7013e2a4d7da85bfae37159f87adb3977).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r57153533
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala ---
    @@ -26,6 +26,9 @@ import org.apache.spark.sql.catalyst.util._
      * Provides helper methods for comparing plans.
      */
     abstract class PlanTest extends SparkFunSuite with PredicateHelper {
    +
    +  System.setProperty("spark.testing", "true")
    --- End diff --
    
    `SPARK_TESTING` is an env variable while `spark.testing` is a JVM system property, but yes both are set by the build for you.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r56122167
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala ---
    @@ -98,7 +107,8 @@ 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) {
    -            logInfo(s"Max iterations (${iteration - 1}) reached for batch ${batch.name}")
    +            val msg = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}"
    +            if (batch.strategy.throws) throw new SparkException(msg) else logTrace(msg)
    --- End diff --
    
    sure. will do


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196698065
  
    Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-200126124
  
    I see. Sure. Let me know if anything I can help. Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-200086023
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53834/
    Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-200085464
  
    I guess I would prioritize getting this in so that we make sure we don't continue to introduce conflicting rules.  If including #11828 in this PR is the fastest path to that where there is agreement, lets just include that here.  If we need to delete `InferFiltersFromConstraints` that is also okay.  We can restore the code in a follow up PR after the problems have been fixed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r56119467
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala ---
    @@ -98,7 +107,8 @@ 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) {
    -            logInfo(s"Max iterations (${iteration - 1}) reached for batch ${batch.name}")
    +            val msg = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}"
    +            if (batch.strategy.throws) throw new SparkException(msg) else logTrace(msg)
    --- End diff --
    
    also indent it properly, i.e.
    
    ```scala
    if (batch.strategy. throwsExceptionUponMaxIterations) {
      throw new ...
    } else {
      logTrace(msg)
    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-200375747
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53936/
    Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r56122162
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala ---
    @@ -46,15 +47,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.
    +   * If throws is equal to true, it will issue an exception AnalysisExceptions
        */
    -  abstract class Strategy { def maxIterations: Int }
    +  abstract class Strategy {
    +    def maxIterations: Int
    +    def throws: Boolean
    --- End diff --
    
    sure. will do


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r56122221
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/BooleanSimplificationSuite.scala ---
    @@ -29,6 +29,7 @@ import org.apache.spark.sql.catalyst.rules._
     class BooleanSimplificationSuite extends PlanTest with PredicateHelper {
     
       object Optimize extends RuleExecutor[LogicalPlan] {
    +    System.setProperty("spark.testing", "true")
    --- End diff --
    
    yeah, a good idea!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196701472
  
    I just merged #11682. Are there more?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r56119755
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala ---
    @@ -98,7 +107,8 @@ 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) {
    -            logInfo(s"Max iterations (${iteration - 1}) reached for batch ${batch.name}")
    +            val msg = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}"
    +            if (batch.strategy.throws) throw new SparkException(msg) else logTrace(msg)
    --- End diff --
    
    This isn't the users fault and will only happen in tests so I wouldn't throw `AnalysisException`.  I might even assert or something?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196720217
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53175/
    Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196720214
  
    Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196693818
  
    Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r57153024
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala ---
    @@ -26,6 +26,9 @@ import org.apache.spark.sql.catalyst.util._
      * Provides helper methods for comparing plans.
      */
     abstract class PlanTest extends SparkFunSuite with PredicateHelper {
    +
    +  System.setProperty("spark.testing", "true")
    --- End diff --
    
    Are you saying ```SPARK_TESTING``` can be set by the test framework?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-200085608
  
    **[Test build #53834 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53834/consoleFull)** for PR 11714 at commit [`23a6cfc`](https://github.com/apache/spark/commit/23a6cfca6e66d39cb4fad280745773f33709fd99).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `  abstract class Strategy `
      * `  case class FixedPoint(maxIterations: Int) extends Strategy `


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r56119479
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/BooleanSimplificationSuite.scala ---
    @@ -29,6 +29,7 @@ import org.apache.spark.sql.catalyst.rules._
     class BooleanSimplificationSuite extends PlanTest with PredicateHelper {
     
       object Optimize extends RuleExecutor[LogicalPlan] {
    +    System.setProperty("spark.testing", "true")
    --- End diff --
    
    should we just change PlanTest?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-200375515
  
    **[Test build #53936 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53936/consoleFull)** for PR 11714 at commit [`1a59fcf`](https://github.com/apache/spark/commit/1a59fcf7013e2a4d7da85bfae37159f87adb3977).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r57118567
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala ---
    @@ -46,15 +48,24 @@ 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.
    +   * If throwsExceptionUponMaxIterations is equal to true, it will issue an exception
    +   * TreeNodeException.
        */
    -  abstract class Strategy { def maxIterations: Int }
    +  abstract class Strategy {
    +    def maxIterations: Int
    +    def throwsExceptionUponMaxIterations: Boolean
    +  }
     
       /** A strategy that only runs once. */
    -  case object Once extends Strategy { val maxIterations = 1 }
    +  case object Once extends Strategy {
    +    override val maxIterations = 1
    +    override val throwsExceptionUponMaxIterations = false
    +  }
     
       /** A strategy that runs until fix point or maxIterations times, whichever comes first. */
    -  case class FixedPoint(maxIterations: Int) extends Strategy
    -
    +  case class FixedPoint(maxIterations: Int) extends Strategy {
    +    override val throwsExceptionUponMaxIterations: Boolean = if (Utils.isTesting) true else false
    --- End diff --
    
    Just write `= Utils.isTesting`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196693517
  
    **[Test build #53166 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53166/consoleFull)** for PR 11714 at commit [`797aabb`](https://github.com/apache/spark/commit/797aabb275af8e7d1208341bcd78bcc41a1d2191).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `  abstract class Strategy `
      * `  case class FixedPoint(maxIterations: Int) extends Strategy `


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-200034759
  
    Can you bring this up to date? We can disable rules that make this fail. @marmbrus and I talked a bit and thought this is pretty critical to have.
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196719935
  
    **[Test build #53175 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53175/consoleFull)** for PR 11714 at commit [`1281f36`](https://github.com/apache/spark/commit/1281f36f624bd23f095e62708fe3516907dbde5d).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r56119880
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala ---
    @@ -98,7 +107,8 @@ 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) {
    -            logInfo(s"Max iterations (${iteration - 1}) reached for batch ${batch.name}")
    +            val msg = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}"
    +            if (batch.strategy.throws) throw new SparkException(msg) else logTrace(msg)
    --- End diff --
    
    +1 on treenodeexception.
    
    i was suggesting analysis because his documentation said analysisexception earlier.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196699484
  
    **[Test build #53175 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53175/consoleFull)** for PR 11714 at commit [`1281f36`](https://github.com/apache/spark/commit/1281f36f624bd23f095e62708fe3516907dbde5d).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r57118551
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala ---
    @@ -26,6 +26,9 @@ import org.apache.spark.sql.catalyst.util._
      * Provides helper methods for comparing plans.
      */
     abstract class PlanTest extends SparkFunSuite with PredicateHelper {
    +
    +  System.setProperty("spark.testing", "true")
    --- End diff --
    
    This is already set by the test framework. MIght be cleaner not to hard code it in just a few places in the tests.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196722691
  
    **[Test build #53176 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53176/consoleFull)** for PR 11714 at commit [`23663fe`](https://github.com/apache/spark/commit/23663fe8750979af00ba200a498119aeb8618a60).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196698564
  
    I will not trigger more tests in this PR until the related PR is merged. Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196702896
  
    **[Test build #53176 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53176/consoleFull)** for PR 11714 at commit [`23663fe`](https://github.com/apache/spark/commit/23663fe8750979af00ba200a498119aeb8618a60).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196698066
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53173/
    Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-200066870
  
    **[Test build #53834 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53834/consoleFull)** for PR 11714 at commit [`23a6cfc`](https://github.com/apache/spark/commit/23a6cfca6e66d39cb4fad280745773f33709fd99).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196693822
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53166/
    Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196697886
  
    **[Test build #53173 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53173/consoleFull)** for PR 11714 at commit [`f351362`](https://github.com/apache/spark/commit/f351362475f4fd9382f36eb60150cad93aa8e864).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r56119436
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala ---
    @@ -46,15 +47,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.
    +   * If throws is equal to true, it will issue an exception AnalysisExceptions
        */
    -  abstract class Strategy { def maxIterations: Int }
    +  abstract class Strategy {
    +    def maxIterations: Int
    +    def throws: Boolean
    --- End diff --
    
    throws -> throwsExceptionUponMaxIterations ? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196722803
  
    Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r57153827
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala ---
    @@ -26,6 +26,9 @@ import org.apache.spark.sql.catalyst.util._
      * Provides helper methods for comparing plans.
      */
     abstract class PlanTest extends SparkFunSuite with PredicateHelper {
    +
    +  System.setProperty("spark.testing", "true")
    --- End diff --
    
    Thank you, will make a try. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r57118618
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala ---
    @@ -46,15 +48,24 @@ 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.
    +   * If throwsExceptionUponMaxIterations is equal to true, it will issue an exception
    +   * TreeNodeException.
        */
    -  abstract class Strategy { def maxIterations: Int }
    +  abstract class Strategy {
    +    def maxIterations: Int
    +    def throwsExceptionUponMaxIterations: Boolean
    +  }
     
       /** A strategy that only runs once. */
    -  case object Once extends Strategy { val maxIterations = 1 }
    +  case object Once extends Strategy {
    +    override val maxIterations = 1
    +    override val throwsExceptionUponMaxIterations = false
    --- End diff --
    
    Isn't this kind of janky to insert a field into the non-test code just to get the behavior you want in a test? how about mocking subclasses?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r57153635
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala ---
    @@ -46,15 +48,24 @@ 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.
    +   * If throwsExceptionUponMaxIterations is equal to true, it will issue an exception
    +   * TreeNodeException.
        */
    -  abstract class Strategy { def maxIterations: Int }
    +  abstract class Strategy {
    +    def maxIterations: Int
    +    def throwsExceptionUponMaxIterations: Boolean
    +  }
     
       /** A strategy that only runs once. */
    -  case object Once extends Strategy { val maxIterations = 1 }
    +  case object Once extends Strategy {
    +    override val maxIterations = 1
    +    override val throwsExceptionUponMaxIterations = false
    --- End diff --
    
    @srowen This is used in multiple components, e.g., `Analyzer` and `Optimizer`. I am not sure how to do it in a more efficient way. Could you give me some hints how we did in the Spark? Any example in the existing code base? Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile closed the pull request at:

    https://github.com/apache/spark/pull/11714


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-200375745
  
    Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11714#discussion_r56119782
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala ---
    @@ -98,7 +107,8 @@ 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) {
    -            logInfo(s"Max iterations (${iteration - 1}) reached for batch ${batch.name}")
    +            val msg = s"Max iterations (${iteration - 1}) reached for batch ${batch.name}"
    +            if (batch.strategy.throws) throw new SparkException(msg) else logTrace(msg)
    --- End diff --
    
    maybe `TreeNodeException` so we have the plan that caused the problem.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-200086020
  
    Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-200063012
  
    Sure, will do it now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-196676820
  
    **[Test build #53166 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53166/consoleFull)** for PR 11714 at commit [`797aabb`](https://github.com/apache/spark/commit/797aabb275af8e7d1208341bcd78bcc41a1d2191).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13891] [SQL] [TEST] Issue Exceptions wh...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the pull request:

    https://github.com/apache/spark/pull/11714#issuecomment-200069678
  
    @rxin @marmbrus This test build will fail for sure. 
    
    The related PRs is https://github.com/apache/spark/pull/11828 by @davies Now, I think his version is more favorable to my PR: https://github.com/apache/spark/pull/11745
    
    Another issue is ongoing. The related `Optimizer` rule is `InferFiltersFromConstraints`: 
    - Sure, we can disable it and the related test cases. 
    - To resolve it, I submitted a PR to avoid the Constraints triggered condition push down:  https://github.com/apache/spark/pull/11765 
    - At the same time, @viirya is resolving the related issue by cleaning the Constraints generation of compound expressions for `IsNotNull`. https://github.com/apache/spark/pull/11809 I think this could also avoid exceeding the max num of iterations. Not 100% sure.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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