Skip to content

feat: create materialized view API#6891

Merged
Xuanwo merged 7 commits into
lance-format:mainfrom
rpgreen:rpgreen/create-mv
May 21, 2026
Merged

feat: create materialized view API#6891
Xuanwo merged 7 commits into
lance-format:mainfrom
rpgreen:rpgreen/create-mv

Conversation

@rpgreen
Copy link
Copy Markdown
Contributor

@rpgreen rpgreen commented May 21, 2026

  • API and namespace stubs for new create_materialized_view API
  • New REST route for materialized view refresh

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added enhancement New feature or request A-python Python bindings labels May 21, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 26.08696% with 17 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance-namespace-impls/src/rest_adapter.rs 31.57% 13 Missing ⚠️
rust/lance-namespace-impls/src/rest.rs 0.00% 2 Missing ⚠️
rust/lance-namespace/src/namespace.rs 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jackye1995
Copy link
Copy Markdown
Contributor

I checked this against .claude/skills/lance-namespace-enterprise/SKILL.md. The PR looks incomplete in three specific places:

  1. Java propagation is missing. createMaterializedView is not added to java/src/main/java/org/lance/namespace/RestNamespace.java, java/src/main/java/org/lance/namespace/DirectoryNamespace.java, or java/lance-jni/src/namespace.rs. java/pom.xml also still pins lance-namespace-core / lance-namespace-apache-client to 0.7.5, so the new Java model types would not be available.

  2. The Python dependency minimum should be bumped. python/python/lance/namespace.py now imports CreateMaterializedViewRequest / CreateMaterializedViewResponse, but python/pyproject.toml still allows lance-namespace>=0.7.5,<0.8. Environments with 0.7.5 or 0.7.6 already installed can fail importing lance.namespace; this should require the first version containing those models, apparently 0.7.7.

  3. The RestAdapter create route is missing. The PR adds /v1/materialized_view/:id/refresh, but not /v1/materialized_view/:id/create or a handler that forwards to backend.create_materialized_view. A RestNamespace client talking to Lance's in-process RestAdapter would 404 on create.

- Java: add createMaterializedView to RestNamespace + DirectoryNamespace
  (plus matching native bindings in lance-jni), bump
  lance-namespace-core/apache-client to 0.7.7 so the new model types
  are on the classpath.
- Python: pin lance-namespace>=0.7.7 since lance.namespace now imports
  CreateMaterializedView{Request,Response}.
- RestAdapter: register POST /v1/materialized_view/:id/create and
  forward to backend.create_materialized_view; without this an
  in-process RestNamespace client would 404 on create.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the A-java Java bindings + JNI label May 21, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@jackye1995 jackye1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

@Xuanwo Xuanwo merged commit 95613a7 into lance-format:main May 21, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-java Java bindings + JNI A-python Python bindings enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants