Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Jul 18, 2021
1 parent e55aee1 commit f1e1162
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions datafusion/tests/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1976,10 +1976,17 @@ async fn csv_explain() {
let expected = vec![
vec![
"logical_plan",
"Projection: #aggregate_test_100.c1\n Filter: #aggregate_test_100.c2 Gt Int64(10)\n TableScan: aggregate_test_100 projection=Some([0, 1])"
"Projection: #aggregate_test_100.c1\
\n Filter: #aggregate_test_100.c2 Gt Int64(10)\
\n TableScan: aggregate_test_100 projection=Some([0, 1])"
],
vec!["physical_plan",
"ProjectionExec: expr=[c1@0 as c1]\n CoalesceBatchesExec: target_batch_size=4096\n FilterExec: CAST(c2@1 AS Int64) > 10\n RepartitionExec: partitioning=RoundRobinBatch(NUM_CORES)\n CsvExec: source=Path(ARROW_TEST_DATA/csv/aggregate_test_100.csv: [ARROW_TEST_DATA/csv/aggregate_test_100.csv]), has_header=true\n"
"ProjectionExec: expr=[c1@0 as c1]\
\n CoalesceBatchesExec: target_batch_size=4096\
\n FilterExec: CAST(c2@1 AS Int64) > 10\
\n RepartitionExec: partitioning=RoundRobinBatch(NUM_CORES)\
\n CsvExec: source=Path(ARROW_TEST_DATA/csv/aggregate_test_100.csv: [ARROW_TEST_DATA/csv/aggregate_test_100.csv]), has_header=true\
\n"
]];
assert_eq!(expected, actual);

Expand Down Expand Up @@ -3940,12 +3947,12 @@ fn normalize_for_explain(s: &str) -> String {
}

/// Applies normalize_for_explain to every line
fn normalize_vec_for_explain(v: Vec<Vec<String>>) -> Vec<Vec<String>>
{
v
.into_iter()
fn normalize_vec_for_explain(v: Vec<Vec<String>>) -> Vec<Vec<String>> {
v.into_iter()
.map(|l| {
l.into_iter().map(|s|normalize_for_explain(&s)).collect::<Vec<_>>()
l.into_iter()
.map(|s| normalize_for_explain(&s))
.collect::<Vec<_>>()
})
.collect::<Vec<_>>()
}

0 comments on commit f1e1162

Please sign in to comment.