MCPcopy Create free account
hub / github.com/apache/arrow-rs / assert_batches_eq

Function assert_batches_eq

arrow-flight/src/sql/metadata/mod.rs:68–75  ·  view source on GitHub ↗
(batches: &[RecordBatch], expected_lines: &[&str])

Source from the content-addressed store, hash-verified

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}

Callers 2

test_create_batchFunction · 0.85
test_sql_infosFunction · 0.85

Calls 3

pretty_format_batchesFunction · 0.85
collectMethod · 0.80
trimMethod · 0.80

Tested by 2

test_create_batchFunction · 0.68
test_sql_infosFunction · 0.68