Skip to content

Commit f7fd1d9

Browse files
remove common constructor for databricks client abc
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 0a0643b commit f7fd1d9

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

src/databricks/sql/backend/databricks_client.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ class DatabricksClient(ABC):
2424
- Fetching metadata about catalogs, schemas, tables, and columns
2525
"""
2626

27-
def __init__(self, ssl_options: SSLOptions, **kwargs):
28-
self._use_arrow_native_complex_types = kwargs.get(
29-
"_use_arrow_native_complex_types", True
30-
)
31-
self._max_download_threads = kwargs.get("max_download_threads", 10)
32-
self._ssl_options = ssl_options
33-
3427
# == Connection and Session Management ==
3528
@abstractmethod
3629
def open_session(

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ def __init__(
124124
http_path,
125125
)
126126

127-
super().__init__(ssl_options=ssl_options, **kwargs)
127+
self._max_download_threads = kwargs.get("max_download_threads", 10)
128+
self._ssl_options = ssl_options
129+
self._use_arrow_native_complex_types = kwargs.get(
130+
"_use_arrow_native_complex_types", True
131+
)
128132

129133
# Extract warehouse ID from http_path
130134
self.warehouse_id = self._extract_warehouse_id(http_path)

src/databricks/sql/backend/thrift_backend.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ def __init__(
149149
http_path,
150150
)
151151

152-
super().__init__(ssl_options, **kwargs)
153-
154152
port = port or 443
155153
if kwargs.get("_connection_uri"):
156154
uri = kwargs.get("_connection_uri")
@@ -164,13 +162,20 @@ def __init__(
164162
raise ValueError("No valid connection settings.")
165163

166164
self._initialize_retry_args(kwargs)
165+
self._use_arrow_native_complex_types = kwargs.get(
166+
"_use_arrow_native_complex_types", True
167+
)
167168

168169
self._use_arrow_native_decimals = kwargs.get("_use_arrow_native_decimals", True)
169170
self._use_arrow_native_timestamps = kwargs.get(
170171
"_use_arrow_native_timestamps", True
171172
)
172173

173174
# Cloud fetch
175+
self._max_download_threads = kwargs.get("max_download_threads", 10)
176+
177+
self._ssl_options = ssl_options
178+
174179
self._auth_provider = auth_provider
175180

176181
# Connector version 3 retry approach

0 commit comments

Comments
 (0)