Skip to content

Commit 9267ef9

Browse files
close_command return not used, replacing with None and logging resp
Signed-off-by: varun-edachali-dbx <[email protected]>
1 parent 7b0cbed commit 9267ef9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/databricks/sql/backend/databricks_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def cancel_command(self, command_id: CommandId) -> None:
5050
pass
5151

5252
@abstractmethod
53-
def close_command(self, command_id: CommandId) -> ttypes.TStatus:
53+
def close_command(self, command_id: CommandId) -> None:
5454
pass
5555

5656
@abstractmethod

src/databricks/sql/backend/thrift_backend.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,15 +1224,17 @@ def cancel_command(self, command_id: CommandId) -> None:
12241224
req = ttypes.TCancelOperationReq(thrift_handle)
12251225
self.make_request(self._client.CancelOperation, req)
12261226

1227-
def close_command(self, command_id: CommandId):
1227+
def close_command(self, command_id: CommandId) -> None:
12281228
thrift_handle = command_id.to_thrift_handle()
12291229
if not thrift_handle:
12301230
raise ValueError("Not a valid Thrift command ID")
12311231

12321232
logger.debug("ThriftBackend.close_command(command_id=%s)", command_id)
12331233
req = ttypes.TCloseOperationReq(operationHandle=thrift_handle)
12341234
resp = self.make_request(self._client.CloseOperation, req)
1235-
return resp.status
1235+
logger.debug(
1236+
"ThriftBackend.close_command(command_id=%s) -> %s", command_id, resp
1237+
)
12361238

12371239
def handle_to_id(self, session_id: SessionId) -> Any:
12381240
"""Get the raw session ID from a SessionId"""

0 commit comments

Comments
 (0)