|
1 | 1 | import logging
|
2 |
| -import uuid |
3 | 2 | import time
|
4 | 3 | 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 |
6 | 5 |
|
7 | 6 | from databricks.sql.backend.sea.utils.constants import (
|
8 | 7 | ALLOWED_SESSION_CONF_TO_DEFAULT_VALUES_MAP,
|
|
23 | 22 | )
|
24 | 23 | from databricks.sql.exc import Error, NotSupportedError, ServerOperationError
|
25 | 24 | from databricks.sql.backend.sea.utils.http_client import SeaHttpClient
|
26 |
| -from databricks.sql.thrift_api.TCLIService import ttypes |
27 | 25 | from databricks.sql.types import SSLOptions
|
28 |
| -from databricks.sql.utils import SeaResultSetQueueFactory |
29 | 26 | from databricks.sql.backend.sea.models.base import (
|
30 | 27 | ResultData,
|
31 | 28 | ExternalLink,
|
@@ -716,3 +713,55 @@ def get_execution_result(
|
716 | 713 | result_data=result_data,
|
717 | 714 | manifest=manifest,
|
718 | 715 | )
|
| 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