|
47 | 47 | from databricks.sql.auth.auth import get_python_sql_connector_auth_provider |
48 | 48 | from databricks.sql.experimental.oauth_persistence import OAuthPersistence |
49 | 49 | from databricks.sql.session import Session |
50 | | -from databricks.sql.backend.types import CommandId, BackendType |
| 50 | +from databricks.sql.backend.types import CommandId, BackendType, SessionId |
51 | 51 |
|
52 | 52 | from databricks.sql.thrift_api.TCLIService.ttypes import ( |
53 | 53 | TSparkParameter, |
@@ -325,9 +325,9 @@ def protocol_version(self): |
325 | 325 | return self.session.protocol_version |
326 | 326 |
|
327 | 327 | @staticmethod |
328 | | - def get_protocol_version(openSessionResp): |
| 328 | + def get_protocol_version(session_id: SessionId): |
329 | 329 | """Delegate to Session class static method""" |
330 | | - return Session.get_protocol_version(openSessionResp) |
| 330 | + return Session.get_protocol_version(session_id) |
331 | 331 |
|
332 | 332 | @property |
333 | 333 | def open(self) -> bool: |
@@ -868,19 +868,6 @@ def is_query_pending(self): |
868 | 868 | ttypes.TOperationState.PENDING_STATE, |
869 | 869 | ] |
870 | 870 |
|
871 | | - def is_query_pending(self): |
872 | | - """ |
873 | | - Checks whether the async executing query is in pending state or not |
874 | | -
|
875 | | - :return: |
876 | | - """ |
877 | | - operation_state = self.get_query_state() |
878 | | - |
879 | | - return not operation_state or operation_state in [ |
880 | | - ttypes.TOperationState.RUNNING_STATE, |
881 | | - ttypes.TOperationState.PENDING_STATE, |
882 | | - ] |
883 | | - |
884 | 871 | def get_async_execution_result(self): |
885 | 872 | """ |
886 | 873 |
|
|
0 commit comments