Skip to content

Commit ca425eb

Browse files
correct TOperationState literal, remove un-necessary check
Signed-off-by: varun-edachali-dbx <[email protected]>
1 parent 04eb8c1 commit ca425eb

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/databricks/sql/backend/thrift_backend.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,6 @@ def open_session(self, session_configuration, catalog, schema) -> SessionId:
585585
response = self.make_request(self._client.OpenSession, open_session_req)
586586
self._check_initial_namespace(catalog, schema, response)
587587
self._check_protocol_version(response)
588-
if response.sessionHandle is None:
589-
return None
590588
info = (
591589
{"serverProtocolVersion": response.serverProtocolVersion}
592590
if response.serverProtocolVersion

src/databricks/sql/backend/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def from_thrift_state(cls, state: ttypes.TOperationState) -> "CommandState":
3535
return cls.FAILED
3636
elif state == ttypes.TOperationState.CLOSED_STATE:
3737
return cls.CLOSED
38-
elif state == ttypes.TOperationState.CANCELLED_STATE:
38+
elif state == ttypes.TOperationState.CANCELED_STATE:
3939
return cls.CANCELLED
4040
else:
4141
raise ValueError(f"Unknown command state: {state}")

0 commit comments

Comments
 (0)