diff --git a/python/python/lancedb/remote/table.py b/python/python/lancedb/remote/table.py index a3523426..3c23d6e5 100644 --- a/python/python/lancedb/remote/table.py +++ b/python/python/lancedb/remote/table.py @@ -89,7 +89,7 @@ class RemoteTable(Table): def to_pandas(self): """to_pandas() is not yet supported on LanceDB cloud.""" - return NotImplementedError("to_pandas() is not yet supported on LanceDB cloud.") + raise NotImplementedError("to_pandas() is not yet supported on LanceDB cloud.") def checkout(self, version: Union[int, str]): return LOOP.run(self._table.checkout(version)) diff --git a/python/python/tests/test_remote_db.py b/python/python/tests/test_remote_db.py index aa7c0c72..ace9f263 100644 --- a/python/python/tests/test_remote_db.py +++ b/python/python/tests/test_remote_db.py @@ -210,6 +210,25 @@ async def test_retry_error(): assert cause.status_code == 429 +def test_table_unimplemented_functions(): + def handler(request): + if request.path == "/v1/table/test/create/?mode=create": + request.send_response(200) + request.send_header("Content-Type", "application/json") + request.end_headers() + request.wfile.write(b"{}") + else: + request.send_response(404) + request.end_headers() + + with mock_lancedb_connection(handler) as db: + table = db.create_table("test", [{"id": 1}]) + with pytest.raises(NotImplementedError): + table.to_arrow() + with pytest.raises(NotImplementedError): + table.to_pandas() + + def test_table_add_in_threadpool(): def handler(request): if request.path == "/v1/table/test/insert/":