Function check_record_batches

Source
pub fn check_record_batches(
    record_batches: Vec<RecordBatch>,
    expected_schema: Expect,
    expected_data: Expect,
    ignore_check_columns: &[&str],
    sort_column: Option<&str>,
)
Expand description

Snapshot testing to check the resulting record batch.

  • expected_schema/data: put expect![[""]] as a placeholder, and then run test with UPDATE_EXPECT=1 cargo test to automatically update the result, or use rust-analyzer (see video). Check the doc of [expect_test] for more details.
  • ignore_check_columns: Some columns are not stable, so we can skip them.
  • sort_column: The order of the data might be non-deterministic, so we can sort it by a column.