alamb commented on code in PR #10363:
URL: https://github.com/apache/datafusion/pull/10363#discussion_r1598891713
##########
datafusion/core/src/physical_planner.rs:
##########
@@ -121,7 +121,7 @@ fn create_function_physical_name(
false => "",
};
- let phys_name = format!("{}({}{})", fun, distinct_str, names.join(","));
+ let phys_name = format!("{}({}{})", fun, distinct_str, names.join(", "));
Review Comment:
Are the changes in this file the only in the PR?
##########
datafusion/core/tests/dataframe/dataframe_functions.rs:
##########
@@ -76,31 +76,25 @@ async fn create_test_table() -> Result<DataFrame> {
/// Compares formatted output of a record batch with an expected
/// vector of strings, using the assert_batch_eq! macro
macro_rules! assert_fn_batches {
- ($EXPR:expr, $EXPECTED: expr) => {
- assert_fn_batches!($EXPR, $EXPECTED, 10)
+ ($EXPR:expr) => {
+ assert_fn_batches!($EXPR, 10)
};
- ($EXPR:expr, $EXPECTED: expr, $LIMIT: expr) => {
+ ($EXPR:expr, $LIMIT: expr) => {
let df = create_test_table().await?;
let df = df.select(vec![$EXPR])?.limit(0, Some($LIMIT))?;
let batches = df.collect().await?;
- assert_batches_eq!($EXPECTED, &batches);
+ // Once result is updated, run command below for snapshot update
+ // `cargo insta test --accept -p datafusion --test core_integration --
dataframe::dataframe_functions`
+ datafusion_common::assert_snapshot!(&batches);
};
}
#[tokio::test]
async fn test_fn_ascii() -> Result<()> {
let expr = ascii(col("a"));
- let expected = [
- "+---------------+",
- "| ascii(test.a) |",
- "+---------------+",
- "| 97 |",
- "+---------------+",
- ];
-
- assert_fn_batches!(expr, expected, 1);
+ assert_fn_batches!(expr, 1);
Review Comment:
I think it was easier to see what was going on with these tests when the
results are inlined -- i think insta supports that too "Inlined snapshots" --
https://insta.rs/docs/snapshot-types/
--
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]