alamb commented on code in PR #8817:
URL: https://github.com/apache/arrow-datafusion/pull/8817#discussion_r1467509655


##########
datafusion/core/src/physical_optimizer/test_utils.rs:
##########
@@ -361,3 +364,17 @@ pub fn sort_exec(
     let sort_exprs = sort_exprs.into_iter().collect();
     Arc::new(SortExec::new(sort_exprs, input))
 }
+
+pub fn check_integrity<T: Clone>(context: PlanContext<T>) -> 
Result<PlanContext<T>> {
+    context.transform_up(&|node| {
+        let children_plans = node.plan.children();
+        assert_eq!(node.children.len(), children_plans.len());
+        for (child_plan, child_node) in 
children_plans.iter().zip(node.children.iter()) {
+            assert_eq!(

Review Comment:
   Makes sense -- maybe that is something that can be embedded in a comment to 
help anyone else that may have the same question



-- 
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]

Reply via email to