apache / apache/gravitino

[Improvement] Native vector search is unavailable through the Gravitino Lance REST namespace

Open
#13,065 3 comments 0 reactions 2 assignees Claimed by @jiangxt2 View on GitHub
improvement
Dominant language
Java
Stars
3.2k
Forks
935
Avg merge
1d 16h
Merged PRs (30d)
298

Description

### Problem Description

In a Spark + Gravitino + Lance environment, the Gravitino Lance REST namespace can resolve Lance table identifiers, locations, and related metadata, but it currently cannot provide the queryTable execution capability required by the Lance Spark Connector for native vector search.

The Lance Spark Connector supports the explicit VECTOR_SEARCH table function, but the query cannot complete when it is executed through the Gravitino Lance REST namespace.

### Reproduction Configuration

```text
spark.sql.catalog.lance=org.lance.spark.LanceNamespaceSparkCatalog
spark.sql.catalog.lance.impl=rest
spark.sql.catalog.lance.uri=http://localhost:9101/lance
spark.sql.catalog.lance.parent=lance_catalog
spark.sql.defaultCatalog=lance
```

### Reproduction SQL

```sql
SELECT id, _distance
FROM VECTOR_SEARCH(
table => 'lance.sales.embeddings',
query_vector => array(0.12, 0.34, 0.56, 0.78),
vector_column => 'embedding',
num_results => 10,
distance_type => 'cosine',
columns => array('id')
)
ORDER BY _distance;
```

### Error

```text
org.lance.namespace.errors.UnsupportedOperationException: Not supported: queryTable
```

When the REST namespace returns an HTTP error, the same limitation may appear as a missing QueryTable route or an HTTP 404 response.

### Impact

Gravitino can currently act as the metadata and governance entry point for Lance tables, but Spark cannot use the same Gravitino Lance REST namespace to perform native vector TopK retrieval.

For workflows that perform Lance vector retrieval in Spark and then join the bounded result with tables from other catalogs, this prevents users from combining Gravitino's unified metadata and authorization capabilities with Lance-native vector search.

The distributed fragment-level Vector TopK splitting and global merge capability in the Lance Spark Connector is a separate Connector-side concern, tracked in lance-spark #608. This Issue only reports the lack of native query execution capability in the Gravitino Lance REST namespace.

### Related Context

- Gravitino #11295: long-term Lance architecture discussion;
- Gravitino #11064: Spark REST Catalog discovery and configuration simplification;
- Gravitino #10445: Lance Namespace protocol compatibility;
- [lance-spark PR #608](https://github.com/lance-format/lance-spark/pull/608): distributed VECTOR_SEARCH execution;
- [lance-spark Discussion #818](https://github.com/lance-format/lance-spark/discussions/818): search execution paths and namespace capabilities.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.