27
27
BackendType ,
28
28
ExecuteResponse ,
29
29
)
30
- from databricks .sql .exc import DatabaseError , ProgrammingError , ServerOperationError
30
+ from databricks .sql .exc import DatabaseError , ServerOperationError
31
31
from databricks .sql .backend .sea .utils .http_client import SeaHttpClient
32
32
from databricks .sql .types import SSLOptions
33
33
@@ -150,7 +150,7 @@ def _extract_warehouse_id(self, http_path: str) -> str:
150
150
The extracted warehouse ID
151
151
152
152
Raises:
153
- ProgrammingError : If the warehouse ID cannot be extracted from the path
153
+ ValueError : If the warehouse ID cannot be extracted from the path
154
154
"""
155
155
156
156
warehouse_pattern = re .compile (r".*/warehouses/(.+)" )
@@ -174,7 +174,7 @@ def _extract_warehouse_id(self, http_path: str) -> str:
174
174
f"Note: SEA only works for warehouses."
175
175
)
176
176
logger .error (error_message )
177
- raise ProgrammingError (error_message )
177
+ raise ValueError (error_message )
178
178
179
179
@property
180
180
def max_download_threads (self ) -> int :
@@ -246,7 +246,7 @@ def close_session(self, session_id: SessionId) -> None:
246
246
session_id: The session identifier returned by open_session()
247
247
248
248
Raises:
249
- ProgrammingError : If the session ID is invalid
249
+ ValueError : If the session ID is invalid
250
250
OperationalError: If there's an error closing the session
251
251
"""
252
252
@@ -503,7 +503,7 @@ def cancel_command(self, command_id: CommandId) -> None:
503
503
command_id: Command identifier to cancel
504
504
505
505
Raises:
506
- ProgrammingError : If the command ID is invalid
506
+ ValueError : If the command ID is invalid
507
507
"""
508
508
509
509
if command_id .backend_type != BackendType .SEA :
@@ -528,7 +528,7 @@ def close_command(self, command_id: CommandId) -> None:
528
528
command_id: Command identifier to close
529
529
530
530
Raises:
531
- ProgrammingError : If the command ID is invalid
531
+ ValueError : If the command ID is invalid
532
532
"""
533
533
534
534
if command_id .backend_type != BackendType .SEA :
@@ -593,7 +593,7 @@ def get_execution_result(
593
593
SeaResultSet: A SeaResultSet instance with the execution results
594
594
595
595
Raises:
596
- ProgrammingError : If the command ID is invalid
596
+ ValueError : If the command ID is invalid
597
597
"""
598
598
599
599
if command_id .backend_type != BackendType .SEA :
0 commit comments