Compare commits

...

1 Commits

Author SHA1 Message Date
Xuanwo 1c94501785 fix: preserve namespace drop errors 2026-09-01 01:47:56 +08:00
+10 -3
View File
@@ -539,9 +539,7 @@ impl Database for LanceNamespaceDatabase {
self.namespace
.drop_table(drop_request)
.await
.map_err(|e| Error::Runtime {
message: format!("Failed to drop table: {}", e),
})?;
.map_err(|e| map_namespace_lance_error(e, name))?;
Ok(())
}
@@ -1495,6 +1493,15 @@ mod tests {
.expect("Failed to list tables");
assert!(!table_names_after.contains(&"drop_test".to_string()));
let error = conn
.drop_table("drop_test", &["test_ns".into()])
.await
.expect_err("dropping a missing table should fail");
assert!(
matches!(error, Error::TableNotFound { ref name, .. } if name == "drop_test"),
"expected TableNotFound, got: {error:?}"
);
// Verify: Cannot open dropped table
let open_result = conn.open_table("drop_test").execute().await;
assert!(open_result.is_err());