Skip to content

Conversation

@gatorsmile
Copy link
Member

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 #11682

gatorsmile and others added 30 commits November 13, 2015 14:50
class BooleanSimplificationSuite extends PlanTest with PredicateHelper {

object Optimize extends RuleExecutor[LogicalPlan] {
System.setProperty("spark.testing", "true")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we just change PlanTest?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, a good idea!

@SparkQA
Copy link

SparkQA commented Mar 15, 2016

Test build #53166 has finished for PR 11714 at commit 797aabb.

  • 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

@SparkQA
Copy link

SparkQA commented Mar 15, 2016

Test build #53173 has finished for PR 11714 at commit f351362.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gatorsmile
Copy link
Member Author

I will not trigger more tests in this PR until the related PR is merged. Thanks!

@rxin
Copy link
Contributor

rxin commented Mar 15, 2016

I just merged #11682. Are there more?

@SparkQA
Copy link

SparkQA commented Mar 15, 2016

Test build #53175 has finished for PR 11714 at commit 1281f36.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Mar 15, 2016

Test build #53176 has finished for PR 11714 at commit 23663fe.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gatorsmile
Copy link
Member Author

@rxin Yeah. There is another 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.

@rxin
Copy link
Contributor

rxin commented Mar 22, 2016

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.

@gatorsmile
Copy link
Member Author

Sure, will do it now.

@gatorsmile
Copy link
Member Author

@rxin @marmbrus This test build will fail for sure.

The first issue is caused by the conflicts of ColumnPruning and PushPredicateThroughProject.

Another issue is caused by Constraints. The related Optimizer rule is InferFiltersFromConstraints:

@marmbrus
Copy link
Contributor

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.

@SparkQA
Copy link

SparkQA commented Mar 22, 2016

Test build #53834 has finished for PR 11714 at commit 23a6cfc.

  • 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

@gatorsmile
Copy link
Member Author

I see. Sure. Let me know if anything I can help. Thanks!

*/
abstract class PlanTest extends SparkFunSuite with PredicateHelper {

System.setProperty("spark.testing", "true")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already set by the test framework. MIght be cleaner not to hard code it in just a few places in the tests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you saying SPARK_TESTING can be set by the test framework?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SPARK_TESTING is an env variable while spark.testing is a JVM system property, but yes both are set by the build for you.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, will make a try.

@SparkQA
Copy link

SparkQA commented Mar 23, 2016

Test build #53936 has finished for PR 11714 at commit 1a59fcf.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gatorsmile gatorsmile closed this Mar 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants