blaginin commented on code in PR #15444:
URL: https://github.com/apache/datafusion/pull/15444#discussion_r2017624415


##########
datafusion/substrait/tests/cases/emit_kind_tests.rs:
##########
@@ -109,18 +117,28 @@ 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!(
+        format!("{}", 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}");
-        assert_eq!(plan1str, plan2str);

Review Comment:
   this changes the logic slightly, before we'd only check equal, but now 
you're checking plan against a snapshot. that's ok but you need to keep 
`assert_eq` IMO



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

Reply via email to