(batches: &[RecordBatch], expected_lines: &[&str])
| 66 | use arrow_array::RecordBatch; |
| 67 | use arrow_cast::pretty::pretty_format_batches; |
| 68 | pub fn assert_batches_eq(batches: &[RecordBatch], expected_lines: &[&str]) { |
| 69 | let formatted = pretty_format_batches(batches).unwrap().to_string(); |
| 70 | let actual_lines: Vec<_> = formatted.trim().lines().collect(); |
| 71 | assert_eq!( |
| 72 | &actual_lines, expected_lines, |
| 73 | "\n\nexpected:\n\n{expected_lines:#?}\nactual:\n\n{actual_lines:#?}\n\n", |
| 74 | ); |
| 75 | } |
| 76 | } |