Skip to content

Commit deb93a0

Browse files
Merge branch 'main' into backend-refactors
2 parents bbef428 + 576eafc commit deb93a0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/databricks/sql/utils.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ def next_n_rows(self, num_rows: int):
4747
def remaining_rows(self):
4848
pass
4949

50+
@abstractmethod
51+
def close(self):
52+
pass
53+
5054

5155
class ResultSetQueueFactory(ABC):
5256
@staticmethod
@@ -159,6 +163,9 @@ def remaining_rows(self):
159163
self.cur_row_index += slice.num_rows
160164
return slice
161165

166+
def close(self):
167+
return
168+
162169

163170
class ArrowQueue(ResultSetQueue):
164171
def __init__(
@@ -195,6 +202,9 @@ def remaining_rows(self) -> "pyarrow.Table":
195202
self.cur_row_index += slice.num_rows
196203
return slice
197204

205+
def close(self):
206+
return
207+
198208

199209
class CloudFetchQueue(ResultSetQueue):
200210
def __init__(
@@ -347,6 +357,9 @@ def _create_empty_table(self) -> "pyarrow.Table":
347357
# Create a 0-row table with just the schema bytes
348358
return create_arrow_table_from_arrow_file(self.schema_bytes, self.description)
349359

360+
def close(self):
361+
self.download_manager._shutdown_manager()
362+
350363

351364
ExecuteResponse = namedtuple(
352365
"ExecuteResponse",

0 commit comments

Comments
 (0)