File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1505,6 +1505,7 @@ def close(self) -> None:
15051505 and self .connection .open
15061506 ):
15071507 self .thrift_backend .close_command (self .command_id )
1508+ self .results .close ()
15081509 except RequestError as e :
15091510 if isinstance (e .args [1 ], CursorAlreadyClosedError ):
15101511 logger .info ("Operation was canceled by a prior request" )
Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ def next_n_rows(self, num_rows: int):
4646 def remaining_rows (self ):
4747 pass
4848
49+ @abstractmethod
50+ def close (self ):
51+ pass
52+
4953
5054class ResultSetQueueFactory (ABC ):
5155 @staticmethod
@@ -157,6 +161,9 @@ def remaining_rows(self):
157161 self .cur_row_index += slice .num_rows
158162 return slice
159163
164+ def close (self ):
165+ return
166+
160167
161168class ArrowQueue (ResultSetQueue ):
162169 def __init__ (
@@ -192,6 +199,9 @@ def remaining_rows(self) -> "pyarrow.Table":
192199 self .cur_row_index += slice .num_rows
193200 return slice
194201
202+ def close (self ):
203+ return
204+
195205
196206class CloudFetchQueue (ResultSetQueue ):
197207 def __init__ (
@@ -341,6 +351,9 @@ def _create_empty_table(self) -> "pyarrow.Table":
341351 # Create a 0-row table with just the schema bytes
342352 return create_arrow_table_from_arrow_file (self .schema_bytes , self .description )
343353
354+ def close (self ):
355+ self .download_manager ._shutdown_manager ()
356+
344357
345358ExecuteResponse = namedtuple (
346359 "ExecuteResponse" ,
You can’t perform that action at this time.
0 commit comments