Skip to content

Commit 5d04cd0

Browse files
Merge branch 'main' into sea-migration
2 parents dc1cb6d + 576eafc commit 5d04cd0

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/databricks/sql/backend/sea/queue.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,6 @@ def remaining_rows(self) -> List[List[str]]:
6969
slice = self.data_array[self.cur_row_index :]
7070
self.cur_row_index += len(slice)
7171
return slice
72+
73+
def close(self):
74+
return

src/databricks/sql/utils.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ def next_n_rows(self, num_rows: int):
5151
def remaining_rows(self):
5252
pass
5353

54+
@abstractmethod
55+
def close(self):
56+
pass
57+
5458

5559
class ThriftResultSetQueueFactory(ABC):
5660
@staticmethod
@@ -163,6 +167,9 @@ def remaining_rows(self):
163167
self.cur_row_index += slice.num_rows
164168
return slice
165169

170+
def close(self):
171+
return
172+
166173

167174
class ArrowQueue(ResultSetQueue):
168175
def __init__(
@@ -200,6 +207,9 @@ def remaining_rows(self) -> "pyarrow.Table":
200207
self.cur_row_index += slice.num_rows
201208
return slice
202209

210+
def close(self):
211+
return
212+
203213

204214
class CloudFetchQueue(ResultSetQueue):
205215
def __init__(
@@ -352,6 +362,9 @@ def _create_empty_table(self) -> "pyarrow.Table":
352362
# Create a 0-row table with just the schema bytes
353363
return create_arrow_table_from_arrow_file(self.schema_bytes, self.description)
354364

365+
def close(self):
366+
self.download_manager._shutdown_manager()
367+
355368

356369
def _bound(min_x, max_x, x):
357370
"""Bound x by [min_x, max_x]

0 commit comments

Comments
 (0)