Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/18956#discussion_r137609405
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
---
@@ -93,6 +101,13 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]]
extends Logging {
""".stripMargin)
}
+ // Run the structural integrity checker against the plan after
each rule.
+ if (!planChecker(result)) {
+ val message = s"After applying rule ${rule.ruleName} in
batch ${batch.name}, " +
+ "the structural integrity of the plan is broken."
+ throw new TreeNodeException(result, message, null)
--- End diff --
move the exception throwing logics into the `planChecker `?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]