From 913ee160b067c23aee1260c5a6aa05f9cda0ba0e Mon Sep 17 00:00:00 2001 From: "lancedb-gatefixer[bot]" <313497061+lancedb-gatefixer[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2026 10:45:34 +0800 Subject: [PATCH] test(python): cover vector index prewarming by name (#3859) ## Summary - cover vector-index prewarming through the Python API using the logical index name returned by list_indices - prevent regression to interpreting a vector index name as a schema column ## Root cause The Lance version used by the reported release opened a vector index by treating the prewarm argument as a column before resolving the index metadata. Current LanceDB dependencies contain the upstream metadata-based resolution, but LanceDB only exercised prewarming for FTS indexes, leaving the vector behavior unguarded. ## Validation - uv run --extra tests pytest python/tests/test_index.py::test_create_vector_index -q - python/.venv/bin/ruff format --check python/python/tests/test_index.py - python/.venv/bin/ruff check . Fixes #2897 Co-authored-by: Gatefixer <313497061+lancedb-gatefixer[bot]@users.noreply.github.com> Co-authored-by: Xuanwo --- python/python/tests/test_index.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/python/tests/test_index.py b/python/python/tests/test_index.py index 2ec14f6f8..a1ec1e04b 100644 --- a/python/python/tests/test_index.py +++ b/python/python/tests/test_index.py @@ -364,6 +364,8 @@ async def test_create_vector_index(some_table: AsyncTable): assert indices[0].columns == ["vector"] assert indices[0].name == "vector_idx" + await some_table.prewarm_index(indices[0].name) + stats = await some_table.index_stats("vector_idx") assert stats.index_type == "IVF_PQ" assert stats.distance_type == "l2"