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: loading version 0 Delta table #1885

Merged
Merged
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
19 changes: 19 additions & 0 deletions crates/deltalake-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,25 @@ mod tests {
);
}

#[tokio::test()]
async fn test_version_zero_table_load() {
let path = "./tests/data/COVID-19_NYT";
let mut latest_table: DeltaTable = crate::open_table(path).await.unwrap();

let mut version_0_table = crate::open_table_with_version(path, 0).await.unwrap();

let version_0_history = version_0_table
.history(None)
.await
.expect("Cannot get table history");
let latest_table_history = latest_table
.history(None)
.await
.expect("Cannot get table history");

assert_eq!(latest_table_history, version_0_history);
}

#[tokio::test()]
#[should_panic(expected = "does not exist or you don't have access!")]
async fn test_fail_fast_on_not_existing_path() {
Expand Down
Loading