feat(mv): partition_by option on create_materialized_view / create_view

Thread an optional partition_by through the client: CreateMaterializedViewRequest
-> REST body -> pyo3 binding -> Python create_materialized_view/create_view
kwarg (sync + async). The server partitions the view's table function by the
named source column -- by IVF index clusters if the column is indexed
(image-dedup), else by distinct value. Unifies Geneva's partition_by +
partition_by_indexed_column into one knob.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Wyatt Alt
2026-06-13 19:08:32 -07:00
committed by Jack Ye
parent b20931b8f7
commit 127054069a
4 changed files with 44 additions and 6 deletions

View File

@@ -413,13 +413,14 @@ impl Connection {
})
}
#[pyo3(signature = (name, query, auto_refresh=false, with_no_data=false))]
#[pyo3(signature = (name, query, auto_refresh=false, with_no_data=false, partition_by=None))]
pub fn create_materialized_view(
self_: PyRef<'_, Self>,
name: String,
query: String,
auto_refresh: bool,
with_no_data: bool,
partition_by: Option<String>,
) -> PyResult<Bound<'_, PyAny>> {
let inner = self_.get_inner()?.clone();
future_into_py(self_.py(), async move {
@@ -429,6 +430,7 @@ impl Connection {
query,
auto_refresh,
with_no_data,
partition_by,
})
.await
.infer_error()