feat: drop_index() remote implementation (#2093)

Support drop_index operation in remote table.
This commit is contained in:
Ryan Green
2025-02-05 10:06:19 -03:30
committed by GitHub
parent 16851389ea
commit ef3093bc23
10 changed files with 109 additions and 6 deletions

View File

@@ -526,6 +526,9 @@ class RemoteTable(Table):
def drop_columns(self, columns: Iterable[str]):
return LOOP.run(self._table.drop_columns(columns))
def drop_index(self, index_name: str):
return LOOP.run(self._table.drop_index(index_name))
def uses_v2_manifest_paths(self) -> bool:
raise NotImplementedError(
"uses_v2_manifest_paths() is not supported on the LanceDB Cloud"

View File

@@ -255,6 +255,9 @@ def test_table_create_indices():
)
)
request.wfile.write(payload.encode())
elif "/drop/" in request.path:
request.send_response(200)
request.end_headers()
else:
request.send_response(404)
request.end_headers()
@@ -266,6 +269,9 @@ def test_table_create_indices():
table.create_scalar_index("id")
table.create_fts_index("text")
table.create_scalar_index("vector")
table.drop_index("vector_idx")
table.drop_index("id_idx")
table.drop_index("text_idx")
@contextlib.contextmanager