Skip to content

Commit

Permalink
minimize line change count
Browse files Browse the repository at this point in the history
  • Loading branch information
OussamaSaoudi-db committed Sep 17, 2024
1 parent e4c3c39 commit 3b09714
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions kernel/tests/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,14 @@ async fn remove_action() -> Result<(), Box<dyn std::error::Error>> {
let snapshot = table.snapshot(&engine, None)?;
let scan = snapshot.into_scan_builder().build()?;

let stream = scan.execute(&engine)?.zip(expected_data);
let stream = scan
.execute(&engine)?
.map(Result::unwrap)
.zip(expected_data);

let mut files = 0;
for (data, expected) in stream {
let raw_data = data?.raw_data?;
let raw_data = data.raw_data?;
files += 1;
assert_eq!(into_record_batch(raw_data), expected);
}
Expand Down Expand Up @@ -464,10 +467,10 @@ fn read_with_scan_data(
) -> Result<(), Box<dyn std::error::Error>> {
let global_state = scan.global_scan_state();
let result_schema: ArrowSchemaRef = Arc::new(scan.schema().as_ref().try_into()?);
let scan_data = scan.scan_data(engine)?.map(Result::unwrap);
let scan_data = scan.scan_data(engine)?;
let mut scan_files = vec![];
for data in scan_data {
let (data, vec) = data;
let (data, vec) = data?;
scan_files = visit_scan_files(data.as_ref(), &vec, scan_files, scan_data_callback)?;
}

Expand Down

0 comments on commit 3b09714

Please sign in to comment.