File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
src/databricks/sql/cloudfetch Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,25 @@ def _schedule_downloads(self):
101101 task = self ._thread_pool .submit (handler .run )
102102 self ._download_tasks .append (task )
103103
104+ def add_links (self , links : List [TSparkArrowResultLink ]):
105+ """
106+ Add more links to the download manager.
107+ Args:
108+ links: List of links to add
109+ """
110+ for link in links :
111+ if link .rowCount <= 0 :
112+ continue
113+ logger .debug (
114+ "ResultFileDownloadManager: adding file link, start offset {}, row count: {}" .format (
115+ link .startRowOffset , link .rowCount
116+ )
117+ )
118+ self ._pending_links .append (link )
119+
120+ # Make sure the download queue is always full
121+ self ._schedule_downloads ()
122+
104123 def _shutdown_manager (self ):
105124 # Clear download handlers and shutdown the thread pool
106125 self ._pending_links = []
You can’t perform that action at this time.
0 commit comments