berkaysynnada commented on code in PR #8817:
URL: https://github.com/apache/arrow-datafusion/pull/8817#discussion_r1467278612
##########
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:
Since `ExecutionPlan`'s do not implement `PartialEq`, we lack a
straightforward way to compare them. However, I believe there are no obstacles
to implementing `PartialEq` support for `ExecutionPlan`'s.
--
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]