alamb commented on code in PR #15480: URL: https://github.com/apache/datafusion/pull/15480#discussion_r2019086527
########## datafusion/substrait/tests/cases/emit_kind_tests.rs: ########## @@ -53,15 +54,15 @@ mod tests { let ctx = add_plan_schemas_to_ctx(SessionContext::new(), &proto_plan)?; let plan = from_substrait_plan(&ctx.state(), &proto_plan).await?; - let plan_str = format!("{}", plan); - - assert_eq!( - plan_str, - // Note that duplicate references in the remap are aliased - "Projection: DATA.B, DATA.A AS A1, DATA.A AS DATA.A__temp__0 AS A2\ - \n Filter: DATA.B = Int64(2)\ - \n TableScan: DATA" - ); + assert_snapshot!( + plan, + // Note that duplicate references in the remap are aliased Review Comment: Thank you for preserving the comment ########## datafusion/substrait/tests/cases/emit_kind_tests.rs: ########## @@ -109,17 +113,21 @@ mod tests { let df = ctx.sql("SELECT a + 1, b + 2 FROM data").await?; let plan = df.into_unoptimized_plan(); - assert_eq!( - format!("{}", plan), - "Projection: data.a + Int64(1), data.b + Int64(2)\ - \n TableScan: data" - ); + assert_snapshot!( + plan, + @r#" + Projection: data.a + Int64(1), data.b + Int64(2) + TableScan: data + "# + ); let proto = to_substrait_plan(&plan, &ctx.state())?; let plan2 = from_substrait_plan(&ctx.state(), &proto).await?; let plan1str = format!("{plan}"); let plan2str = format!("{plan2}"); + println!("{}", plan1str); Review Comment: we can probably remove these printlns, unless there is some reason to keep them -- 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