Skip to content

Commit 030edf8

Browse files
raise NotImplementedErrror for metadata ops
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 484064e commit 030edf8

File tree

1 file changed

+53
-4
lines changed

1 file changed

+53
-4
lines changed

src/databricks/sql/backend/sea/backend.py

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import logging
2-
import uuid
32
import time
43
import re
5-
from typing import Dict, Tuple, List, Optional, Any, Union, TYPE_CHECKING, Set
4+
from typing import Dict, Tuple, List, Optional, Union, TYPE_CHECKING, Set
65

76
from databricks.sql.backend.sea.utils.constants import (
87
ALLOWED_SESSION_CONF_TO_DEFAULT_VALUES_MAP,
@@ -23,9 +22,7 @@
2322
)
2423
from databricks.sql.exc import Error, NotSupportedError, ServerOperationError
2524
from databricks.sql.backend.sea.utils.http_client import SeaHttpClient
26-
from databricks.sql.thrift_api.TCLIService import ttypes
2725
from databricks.sql.types import SSLOptions
28-
from databricks.sql.utils import SeaResultSetQueueFactory
2926
from databricks.sql.backend.sea.models.base import (
3027
ResultData,
3128
ExternalLink,
@@ -716,3 +713,55 @@ def get_execution_result(
716713
result_data=result_data,
717714
manifest=manifest,
718715
)
716+
717+
# == Metadata Operations ==
718+
719+
def get_catalogs(
720+
self,
721+
session_id: SessionId,
722+
max_rows: int,
723+
max_bytes: int,
724+
cursor: "Cursor",
725+
) -> "ResultSet":
726+
"""Get available catalogs by executing 'SHOW CATALOGS'."""
727+
raise NotImplementedError("get_catalogs is not implemented for SEA backend")
728+
729+
def get_schemas(
730+
self,
731+
session_id: SessionId,
732+
max_rows: int,
733+
max_bytes: int,
734+
cursor: "Cursor",
735+
catalog_name: Optional[str] = None,
736+
schema_name: Optional[str] = None,
737+
) -> "ResultSet":
738+
"""Get schemas by executing 'SHOW SCHEMAS IN catalog [LIKE pattern]'."""
739+
raise NotImplementedError("get_schemas is not implemented for SEA backend")
740+
741+
def get_tables(
742+
self,
743+
session_id: SessionId,
744+
max_rows: int,
745+
max_bytes: int,
746+
cursor: "Cursor",
747+
catalog_name: Optional[str] = None,
748+
schema_name: Optional[str] = None,
749+
table_name: Optional[str] = None,
750+
table_types: Optional[List[str]] = None,
751+
) -> "ResultSet":
752+
"""Get tables by executing 'SHOW TABLES IN catalog [SCHEMA LIKE pattern] [LIKE pattern]'."""
753+
raise NotImplementedError("get_tables is not implemented for SEA backend")
754+
755+
def get_columns(
756+
self,
757+
session_id: SessionId,
758+
max_rows: int,
759+
max_bytes: int,
760+
cursor: "Cursor",
761+
catalog_name: Optional[str] = None,
762+
schema_name: Optional[str] = None,
763+
table_name: Optional[str] = None,
764+
column_name: Optional[str] = None,
765+
) -> "ResultSet":
766+
"""Get columns by executing 'SHOW COLUMNS IN CATALOG catalog [SCHEMA LIKE pattern] [TABLE LIKE pattern] [LIKE pattern]'."""
767+
raise NotImplementedError("get_columns is not implemented for SEA backend")

0 commit comments

Comments
 (0)