Skip to content

Commit

Permalink
Add new asserts for schema dropping test
Browse files Browse the repository at this point in the history
  • Loading branch information
gruuya committed Dec 27, 2023
1 parent 35c4647 commit 34901f0
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/statements/ddl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,30 @@ async fn test_create_table_drop_schema(
.await;
}

// Assert that the objects in the new schema are left intact
for table_name in [
"new_schema.table_1",
"new_schema.table_2",
"new_schema.table_3",
] {
let mut table = context.try_get_delta_table(table_name).await?;
table.load().await?;
let table_uuid = context.get_table_uuid(table_name).await?;

testutils::assert_uploaded_objects(
context
.internal_object_store
.get_log_store(table_uuid)
.object_store(),
vec![
Path::from("_delta_log/00000000000000000000.json"),
Path::from("_delta_log/00000000000000000001.json"),
table.get_files()[0].clone(),
],
)
.await;
}

// DROP the new_schema
context
.collect(context.plan_query("DROP SCHEMA new_schema").await?)
Expand Down

0 comments on commit 34901f0

Please sign in to comment.