test: pin the custom-location creation path; scope the overview to what ships

The reopen-failure arm of canonicalization had no direct regression: a
fallback to the caller handle would revive the bug unseen. The module doc
also named a refresh method this layer does not define.
This commit is contained in:
Wyatt Alt
2026-08-15 01:08:59 -07:00
parent f0e6235db7
commit 1d8c2a0a6f
+19 -1
View File
@@ -7,7 +7,7 @@
//! over one source table -- projected expressions, an optional filter, an
//! optional row limit -- and maintained by refresh rather than by writes.
//! Creating one commits an empty table carrying the definition in schema
//! metadata; [`MaterializedView::refresh`] computes the rows. The source
//! metadata; a later refresh computes the rows. The source
//! table must have stable row ids ([`CreateMaterializedViewBuilder::execute`]
//! says why).
//!
@@ -1278,6 +1278,24 @@ mod tests {
"{err}"
);
// A table created at a custom location is refused outright: its
// recorded name reaches nothing at the database root, so the
// canonical reopen fails before any URI comparison.
let custom = conn
.create_table(
"custom_loc",
record_batch!(("id", Int32, [1, 2]), ("value", Int32, [3, 4])).unwrap(),
)
.location("memory://elsewhere/custom_loc")
.write_options(stable_row_ids())
.execute()
.await
.unwrap();
let err = prepare_declaration(&custom, &[], None, None)
.await
.unwrap_err();
assert!(err.to_string().contains("custom_loc"), "{err}");
// A namespaced source cannot be recorded in the definition: the
// bare name refresh resolves would reach a different table or none.
let namespaced = crate::table::NativeTable::create(