Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Port cdf tests from delta-spark to kernel #611

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
16 changes: 8 additions & 8 deletions kernel/src/table_changes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ impl TableChanges {
start_version: Version,
end_version: Option<Version>,
) -> DeltaResult<Self> {
let log_root = table_root.join("_delta_log/")?;
let log_segment = LogSegment::for_table_changes(
engine.get_file_system_client().as_ref(),
log_root,
start_version,
end_version,
)?;

// Both snapshots ensure that reading is supported at the start and end version using
// `ensure_read_supported`. Note that we must still verify that reading is
// supported for every protocol action in the CDF range.
Expand Down Expand Up @@ -173,14 +181,6 @@ impl TableChanges {
)));
}

let log_root = table_root.join("_delta_log/")?;
let log_segment = LogSegment::for_table_changes(
engine.get_file_system_client().as_ref(),
log_root,
start_version,
end_version,
)?;

let schema = StructType::new(
end_snapshot
.schema()
Expand Down
321 changes: 316 additions & 5 deletions kernel/tests/cdf.rs

Large diffs are not rendered by default.

Binary file not shown.
Binary file added kernel/tests/data/cdf-table-data-change.tar.zst
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified kernel/tests/data/cdf-table-non-partitioned.tar.zst
Binary file not shown.
Binary file added kernel/tests/data/cdf-table-partitioned.tar.zst
Binary file not shown.
Binary file added kernel/tests/data/cdf-table-simple.tar.zst
Binary file not shown.
Binary file added kernel/tests/data/cdf-table-update-ops.tar.zst
Binary file not shown.
Binary file modified kernel/tests/data/cdf-table-with-cdc-and-dvs.tar.zst
Binary file not shown.
Binary file modified kernel/tests/data/cdf-table-with-dv.tar.zst
Binary file not shown.
Binary file modified kernel/tests/data/cdf-table.tar.zst
Binary file not shown.
Loading