Skip to content

Commit

Permalink
post merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mosyp committed Sep 9, 2021
1 parent e3bb8a3 commit 640b978
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rust/tests/checkpoint_writer_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async fn write_simple_checkpoint() {
cleanup_checkpoint_files(log_path.as_path());

// Load the delta table at version 5
let table = deltalake::open_table_with_version(table_location, 5)
let mut table = deltalake::open_table_with_version(table_location, 5)
.await
.unwrap();

Expand Down Expand Up @@ -96,7 +96,7 @@ mod fs_common;

#[tokio::test]
async fn test_checkpoints_with_tombstones() {
let main_branch = true;
let main_branch = false;
if main_branch {
test_checkpoints_with_tombstones_main().await
} else {
Expand Down Expand Up @@ -137,16 +137,16 @@ async fn test_checkpoints_with_tombstones_map_support() {
let (removes1, opt1) = pseudo_optimize(&mut table, 5 * 59 * 1000).await;
assert_eq!(table.get_files(), vec![opt1.path.as_str()]);
assert_eq!(
table.get_tombstones(),
removes1.iter().collect::<Vec<&Remove>>()
table.get_state().all_tombstones(),
&removes1
);

checkpoints::create_checkpoint_from_table(&table)
.await
.unwrap();
table.update().await.unwrap(); // make table to read the checkpoint
assert_eq!(table.get_files(), vec![opt1.path.as_str()]);
assert_eq!(table.get_tombstones(), Vec::<&Remove>::new()); // stale removes are deleted from the state
assert_eq!(table.get_state().all_tombstones(), &vec![]); // stale removes are deleted from the state
}

async fn pseudo_optimize(table: &mut DeltaTable, offset_millis: i64) -> (Vec<Remove>, Add) {
Expand Down

0 comments on commit 640b978

Please sign in to comment.