You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some unit tests in DataFusion organize expected result string vector in one line, like sql::union::union_distinct do
#[tokio::test]
async fn union_distinct() -> Result<()> {
let ctx = SessionContext::new();
let sql = "SELECT 1 as x UNION SELECT 1 as x";
let actual = execute_to_batches(&ctx, sql).await;
let expected = vec!["+---+", "| x |", "+---+", "| 1 |", "+---+"];
assert_batches_eq!(expected, &actual);
Ok(())
}
We can separate the expected result string vector into multiple line to make it more readable and easier to follow, by adding a #[rustfmt::skip] tag to skip fmt check as following code
#[tokio::test]
async fn union_distinct() -> Result<()> {
let ctx = SessionContext::new();
let sql = "SELECT 1 as x UNION SELECT 1 as x";
let actual = execute_to_batches(&ctx, sql).await;
#[rustfmt::skip]
let expected = vec![
"+---+",
"| x |",
"+---+",
"| 1 |",
"+---+"
];
assert_batches_eq!(expected, &actual);
Ok(())
}
The text was updated successfully, but these errors were encountered:
Some unit tests in DataFusion organize expected result string vector in one line, like
sql::union::union_distinct
doWe can separate the expected result string vector into multiple line to make it more readable and easier to follow, by adding a
#[rustfmt::skip]
tag to skip fmt check as following codeThe text was updated successfully, but these errors were encountered: