WinkerDu opened a new issue, #2412:
URL: https://github.com/apache/arrow-datafusion/issues/2412
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(())
}
```
--
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]