Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/18956#discussion_r137679007
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
---
@@ -64,6 +64,14 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]]
extends Logging {
protected def batches: Seq[Batch]
/**
+ * Defines a check function which checks for structural integrity of the
plan after the execution
+ * of each rule. For example, we can check whether a plan is still
resolved after each rule in
+ * `Optimizer`, so we can catch rules that return invalid plans. The
check function will returns
+ * `false` if the given plan doesn't pass the structural integrity check.
+ */
+ protected def planChecker(plan: TreeType): Boolean = true
--- End diff --
Looks good.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]