Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
OussamaSaoudi-db committed Sep 27, 2024
1 parent 7ce4593 commit 4c902ac
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion acceptance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ delta_kernel = { path = "../kernel", features = [
"developer-visibility",
] }
futures = "0.3"
itertools = "0.13"
object_store = { workspace = true }
parquet = { workspace = true }
serde = { version = "1", features = ["derive"] }
Expand Down
3 changes: 1 addition & 2 deletions acceptance/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use arrow_select::{concat::concat_batches, filter::filter_record_batch, take::ta

use delta_kernel::{engine::arrow_data::ArrowEngineData, DeltaResult, Engine, Error, Table};
use futures::{stream::TryStreamExt, StreamExt};
use itertools::Itertools;
use object_store::{local::LocalFileSystem, ObjectStore};
use parquet::arrow::async_reader::{ParquetObjectReader, ParquetRecordBatchStreamBuilder};

Expand Down Expand Up @@ -145,7 +144,7 @@ pub async fn assert_scan_data(engine: Arc<dyn Engine>, test_case: &TestCaseInfo)
Ok(record_batch)
}
})
.try_collect()?;
.collect::<DeltaResult<Vec<RecordBatch>>>()?;
let all_data = concat_batches(&schema.unwrap(), batches.iter()).map_err(Error::from)?;
let all_data = sort_record_batch(all_data)?;
let golden = read_golden(test_case.root_dir(), None).await?;
Expand Down
5 changes: 2 additions & 3 deletions kernel/src/scan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ impl Scan {
.flatten_ok()
.flatten_ok();

let scan_result_iter = scan_files_iter
Ok(scan_files_iter
.map_ok(move |scan_file| -> DeltaResult<_> {
let file_path = self.snapshot.table_root.join(&scan_file.path)?;
let mut selection_vector = scan_file
Expand Down Expand Up @@ -323,8 +323,7 @@ impl Scan {
})
.flatten_ok()
.flatten_ok()
.flatten_ok();
Ok(scan_result_iter)
.flatten_ok())
}
}

Expand Down
3 changes: 1 addition & 2 deletions kernel/tests/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use delta_kernel::scan::state::{visit_scan_files, DvInfo, Stats};
use delta_kernel::scan::{transform_to_logical, Scan};
use delta_kernel::schema::Schema;
use delta_kernel::{DeltaResult, Engine, EngineData, FileMeta, Table};
use itertools::Itertools;
use object_store::{memory::InMemory, path::Path, ObjectStore};
use parquet::arrow::arrow_writer::ArrowWriter;
use parquet::file::properties::WriterProperties;
Expand Down Expand Up @@ -414,7 +413,7 @@ fn read_with_execute(
Ok(record_batch)
}
})
.try_collect()?;
.collect::<DeltaResult<Vec<RecordBatch>>>()?;

if expected.is_empty() {
assert_eq!(batches.len(), 0);
Expand Down

0 comments on commit 4c902ac

Please sign in to comment.