Skip to content

Commit cd4015b

Browse files
move ThriftResultSet import to top of file
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 1e21434 commit cd4015b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/databricks/sql/backend/thrift_backend.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import threading
66
from typing import Union, TYPE_CHECKING
77

8+
from databricks.sql.result_set import ThriftResultSet
9+
810
if TYPE_CHECKING:
911
from databricks.sql.client import Cursor
1012
from databricks.sql.result_set import ResultSet
@@ -810,8 +812,6 @@ def _results_message_to_execute_response(self, resp, operation_state):
810812
def get_execution_result(
811813
self, command_id: CommandId, cursor: "Cursor"
812814
) -> "ResultSet":
813-
from databricks.sql.result_set import ThriftResultSet
814-
815815
thrift_handle = command_id.to_thrift_handle()
816816
if not thrift_handle:
817817
raise ValueError("Not a valid Thrift command ID")
@@ -945,8 +945,6 @@ def execute_command(
945945
async_op=False,
946946
enforce_embedded_schema_correctness=False,
947947
) -> Union["ResultSet", None]:
948-
from databricks.sql.result_set import ThriftResultSet
949-
950948
thrift_handle = session_id.to_thrift_handle()
951949
if not thrift_handle:
952950
raise ValueError("Not a valid Thrift session ID")

0 commit comments

Comments
 (0)