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 7 commits into
base: main
Choose a base branch
from
Open
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
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
323 changes: 318 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 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.
Loading