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