Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,11 @@ pub unsafe extern "C" fn builder_build(
let allocate_fn = builder_box.allocate_fn;
unsafe {
catch_unwind_into_extern_result(&allocate_fn, move || {
get_default_engine_impl(builder_box.url, builder_box.options, builder_box.allocate_fn)
get_default_engine_impl(
builder_box.url,
builder_box.options,
builder_box.allocate_fn,
)
})
}
}
Expand Down Expand Up @@ -555,8 +559,11 @@ unsafe fn catch_unwind_into_extern_result<T>(
alloc: &dyn AllocateError,
f: impl FnOnce() -> DeltaResult<T>,
) -> ExternResult<T> {
let result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(f))
.unwrap_or_else(|_| Err(Error::generic("delta-kernel-rs panicked across the FFI boundary")));
let result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(f)).unwrap_or_else(|_| {
Err(Error::generic(
"delta-kernel-rs panicked across the FFI boundary",
))
});
unsafe { result.into_extern_result(alloc) }
}

Expand Down
1 change: 0 additions & 1 deletion ffi/src/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,5 +624,4 @@ mod tests {
let final_map: HashMap<String, String> = *unsafe { Box::from_raw(map_ptr) };
assert_eq!(test_map, final_map);
}

}
4 changes: 2 additions & 2 deletions ffi/src/table_changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ use crate::expressions::kernel_visitor::{unwrap_kernel_predicate, KernelExpressi
use crate::scan::EnginePredicate;
use crate::{
catch_unwind_into_extern_result, kernel_string_slice, unwrap_and_parse_path_as_url,
AllocateStringFn, ExternEngine, ExternResult, IntoExternResult, KernelStringSlice,
NullableCvoid, SharedExternEngine, SharedSchema,
AllocateStringFn, ExternEngine, ExternResult, KernelStringSlice, NullableCvoid,
SharedExternEngine, SharedSchema,
};

#[handle_descriptor(target=TableChanges, mutable=true, sized=true)]
Expand Down
2 changes: 1 addition & 1 deletion kernel/src/actions/visitors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@

impl AddVisitor {
#[internal_api]
fn visit_add<'a>(

Check failure on line 102 in kernel/src/actions/visitors.rs

View workflow job for this annotation

GitHub Actions / arrow_integration_test (ubuntu-latest)

associated functions `visit_add` and `names_and_types` are never used

Check failure on line 102 in kernel/src/actions/visitors.rs

View workflow job for this annotation

GitHub Actions / arrow_integration_test (ubuntu-latest)

associated functions `visit_add` and `names_and_types` are never used

Check failure on line 102 in kernel/src/actions/visitors.rs

View workflow job for this annotation

GitHub Actions / arrow_integration_test (macOS-latest)

associated functions `visit_add` and `names_and_types` are never used

Check failure on line 102 in kernel/src/actions/visitors.rs

View workflow job for this annotation

GitHub Actions / arrow_integration_test (macOS-latest)

associated functions `visit_add` and `names_and_types` are never used

Check failure on line 102 in kernel/src/actions/visitors.rs

View workflow job for this annotation

GitHub Actions / arrow_integration_test (windows-latest, false)

associated functions `visit_add` and `names_and_types` are never used
row_index: usize,
path: String,
getters: &[&'a dyn GetData<'a>],
Expand Down Expand Up @@ -172,7 +172,7 @@

impl RemoveVisitor {
#[internal_api]
pub(crate) fn visit_remove<'a>(

Check failure on line 175 in kernel/src/actions/visitors.rs

View workflow job for this annotation

GitHub Actions / arrow_integration_test (ubuntu-latest)

associated functions `visit_remove` and `names_and_types` are never used

Check failure on line 175 in kernel/src/actions/visitors.rs

View workflow job for this annotation

GitHub Actions / arrow_integration_test (ubuntu-latest)

associated functions `visit_remove` and `names_and_types` are never used

Check failure on line 175 in kernel/src/actions/visitors.rs

View workflow job for this annotation

GitHub Actions / arrow_integration_test (macOS-latest)

associated functions `visit_remove` and `names_and_types` are never used

Check failure on line 175 in kernel/src/actions/visitors.rs

View workflow job for this annotation

GitHub Actions / arrow_integration_test (macOS-latest)

associated functions `visit_remove` and `names_and_types` are never used

Check failure on line 175 in kernel/src/actions/visitors.rs

View workflow job for this annotation

GitHub Actions / arrow_integration_test (windows-latest, false)

associated functions `visit_remove` and `names_and_types` are never used
row_index: usize,
path: String,
getters: &[&'a dyn GetData<'a>],
Expand Down Expand Up @@ -248,7 +248,7 @@

impl CdcVisitor {
#[internal_api]
pub(crate) fn visit_cdc<'a>(

Check failure on line 251 in kernel/src/actions/visitors.rs

View workflow job for this annotation

GitHub Actions / arrow_integration_test (ubuntu-latest)

associated function `visit_cdc` is never used

Check failure on line 251 in kernel/src/actions/visitors.rs

View workflow job for this annotation

GitHub Actions / arrow_integration_test (ubuntu-latest)

associated function `visit_cdc` is never used

Check failure on line 251 in kernel/src/actions/visitors.rs

View workflow job for this annotation

GitHub Actions / arrow_integration_test (macOS-latest)

associated function `visit_cdc` is never used

Check failure on line 251 in kernel/src/actions/visitors.rs

View workflow job for this annotation

GitHub Actions / arrow_integration_test (macOS-latest)

associated function `visit_cdc` is never used

Check failure on line 251 in kernel/src/actions/visitors.rs

View workflow job for this annotation

GitHub Actions / arrow_integration_test (windows-latest, false)

associated function `visit_cdc` is never used
row_index: usize,
path: String,
getters: &[&'a dyn GetData<'a>],
Expand Down Expand Up @@ -826,7 +826,7 @@
};
let expected = vec![add1, add2, add3];
assert_eq!(add_visitor.adds.len(), expected.len());
for (add, expected) in add_visitor.adds.into_iter().zip(expected.into_iter()) {
for (add, expected) in add_visitor.adds.into_iter().zip(expected) {
assert_eq!(add, expected);
}
}
Expand Down
1 change: 1 addition & 0 deletions kernel/src/engine/parquet_row_group_skipping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ impl ParquetStatsProvider for RowGroupFilter<'_> {
// physical name mapping has been performed. Because we currently lack both the
// validation and the name mapping support, we must disable this optimization for the
// time being. See https://github.com/delta-io/delta-kernel-rs/issues/434.
#[allow(unknown_lints, clippy::some_filter)]
return Some(self.get_parquet_rowcount_stat()).filter(|_| false);
};

Expand Down
5 changes: 4 additions & 1 deletion kernel/src/scan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,10 @@ impl Scan {
&self,
engine: Arc<dyn Engine>,
) -> DeltaResult<impl Iterator<Item = DeltaResult<Box<dyn EngineData>>>> {
fn scan_metadata_callback(batches: &mut Vec<state::ScanFile>, file: state::ScanFile) -> bool {
fn scan_metadata_callback(
batches: &mut Vec<state::ScanFile>,
file: state::ScanFile,
) -> bool {
batches.push(file);
true
}
Expand Down
1 change: 1 addition & 0 deletions kernel/src/schema/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,7 @@ impl ColumnNamesAndTypes {
(&self.0, &self.1)
}

#[allow(dead_code)]
pub(crate) fn extend(&mut self, other: ColumnNamesAndTypes) {
self.0.extend(other.0);
self.1.extend(other.1);
Expand Down
Loading