qstommyshu commented on code in PR #15937:
URL: https://github.com/apache/datafusion/pull/15937#discussion_r2072660969
##########
datafusion/optimizer/src/test/mod.rs:
##########
@@ -242,6 +226,24 @@ pub fn assert_optimized_plan_eq_display_indent(
assert_eq!(formatted_plan, expected);
}
+#[macro_export]
+macro_rules! assert_optimized_plan_eq_display_indent_snapshot {
+ (
+ $rule:expr,
+ $plan:expr,
+ @ $expected:literal $(,)?
+ ) => {{
+ let optimizer = $crate::Optimizer::with_rules(vec![$rule]);
+ let optimized_plan = optimizer
+ .optimize($plan, &$crate::OptimizerContext::new(), |_, _| {})
+ .expect("failed to optimize plan");
Review Comment:
Display ident schema is not only for snapshot testing, it is wildly used in
many test files. I don't think adding comment here is needed.
--
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]