mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-13 14:16:54 +00:00
fix: gate experimental local functions behind an opt-in feature (#4688)
Published SDK builds currently expose local SQL computed columns and materialized-view execution that are not ready for release. Add the opt-in `experimental-functions` Cargo feature to the Rust core and forward it through the Python and Node bindings; published packages leave it disabled. Local declarations and refreshes now return `NotSupported` before mutating tables or spawning jobs, including prepared materialized-view creation. Remote Cloud/Enterprise client operations, Python UDF packaging, ordinary eager `add_columns`, and access to existing data remain available. Stored metadata and write protections stay active, and shared server commit helpers remain usable. CI covers both feature configurations. Existing local execution tests run with the feature enabled; default-build regressions cover early rejection, unchanged table versions, existing metadata protections, and normal eager transforms. API and source-build documentation explain the opt-in. Validation: Rust library tests pass with the feature disabled (1,869 tests) and enabled (1,947 tests), plus three default-build integration regressions. Python and TypeScript bindings were rebuilt and tested in both configurations, including mocked remote requests; Rust formatting, Python package lint, TypeScript lint/build, and generated docs were checked. Repository-wide Ruff still reports 48 pre-existing errors in unchanged `docs/web-tests` files.
This commit is contained in:
@@ -429,6 +429,13 @@ scoped to each invocation and support `read`, `readinto`, `seek`, `tell`,
|
||||
|
||||
## Materialized Views (Synchronous)
|
||||
|
||||
In the 0.41 SDK release, local materialized-view creation and refresh require a
|
||||
source build with the `experimental-functions` Cargo feature. Published Python
|
||||
packages leave it disabled. Opening, reading, listing and dropping existing views
|
||||
remain available, as do remote Cloud and Enterprise operations. The same feature
|
||||
requirement applies to local SQL computed-column declaration and refresh; ordinary
|
||||
eager `add_columns` transforms remain available.
|
||||
|
||||
On Cloud and Enterprise, creation accepts `auto_refresh_enabled` and
|
||||
`auto_refresh_interval_seconds`:
|
||||
|
||||
@@ -443,7 +450,8 @@ view = db.create_materialized_view(
|
||||
|
||||
Omit `auto_refresh_interval_seconds` to let the server determine when to refresh.
|
||||
These options also apply to asynchronous creation and creation jobs. Embedded
|
||||
connections support manual refresh and reject automatic scheduling requests.
|
||||
connections built with `experimental-functions` support manual refresh and reject
|
||||
automatic scheduling requests.
|
||||
|
||||
::: lancedb.materialized_view.MaterializedView
|
||||
|
||||
|
||||
Reference in New Issue
Block a user