wiedld commented on code in PR #13986:
URL: https://github.com/apache/datafusion/pull/13986#discussion_r1914280267
##########
datafusion/core/src/physical_planner.rs:
##########
@@ -2006,6 +2001,45 @@ fn tuple_err<T, R>(value: (Result<T>, Result<R>)) ->
Result<(T, R)> {
}
}
+#[derive(Default)]
+struct InvariantChecker;
+
+impl InvariantChecker {
+ /// Checks that the plan change is permitted, returning an Error if not.
+ ///
+ /// In debug mode, this recursively walks the entire physical plan and
+ /// performs additional checks using
[`ExecutionPlan::check_node_invariants`].
+ pub fn check(
+ &mut self,
+ plan: &Arc<dyn ExecutionPlan>,
+ rule: &Arc<dyn PhysicalOptimizerRule + Send + Sync>,
Review Comment:
I expanded the use of `rule` in the invariant check. [See
here](https://github.com/apache/datafusion/pull/13986#discussion_r1914279888).
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]