wiedld commented on code in PR #13986: URL: https://github.com/apache/datafusion/pull/13986#discussion_r1914317566
########## datafusion/physical-plan/src/execution_plan.rs: ########## @@ -110,6 +110,16 @@ pub trait ExecutionPlan: Debug + DisplayAs + Send + Sync { /// trait, which is implemented for all `ExecutionPlan`s. fn properties(&self) -> &PlanProperties; + /// Returns an error if this individual node does not conform to its invariants. + /// These invariants are typically only checked in debug mode. + /// + /// A default set of invariants is provided in the default implementation. + /// Extension nodes can provide their own invariants. + fn check_node_invariants(&self) -> Result<()> { + // TODO Review Comment: > Some rules only take in valid plans and output valid plans (e.g. ProjectionPushdown). These are typically applied at later stages in the optimization/plan construction process When running our current sqllogic test suite, I found that most rules were passing through the same validity of plan. For example, the `ProjectionPushdown` usually had an "unexecutable" plan (due to an early OutputRequirements rule output) and the pushdown rule itself did not change the validity. That is why the default impl behavior of the `PhysicalOptimizerRule::executable_check` is to pass through the current plan validity expectation. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org