This repository was archived by the owner on Mar 6, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -703,15 +703,12 @@ def _download_table_bqstorage(
703703 continue
704704
705705 # Return any remaining values after the workers finished.
706- while not worker_queue . empty () : # pragma: NO COVER
706+ while True : # pragma: NO COVER
707707 try :
708- # Include a timeout because even though the queue is
709- # non-empty, it doesn't guarantee that a subsequent call to
710- # get() will not block.
711- frame = worker_queue .get (timeout = _PROGRESS_INTERVAL )
708+ frame = worker_queue .get_nowait ()
712709 yield frame
713710 except queue .Empty : # pragma: NO COVER
714- continue
711+ break
715712 finally :
716713 # No need for a lock because reading/replacing a variable is
717714 # defined to be an atomic operation in the Python language
Original file line number Diff line number Diff line change @@ -1490,13 +1490,12 @@ def _to_page_iterable(
14901490 if not self ._validate_bqstorage (bqstorage_client , False ):
14911491 bqstorage_client = None
14921492
1493- if bqstorage_client is not None :
1494- for item in bqstorage_download ():
1495- yield item
1496- return
1497-
1498- for item in tabledata_list_download ():
1499- yield item
1493+ result_pages = (
1494+ bqstorage_download ()
1495+ if bqstorage_client is not None
1496+ else tabledata_list_download ()
1497+ )
1498+ yield from result_pages
15001499
15011500 def _to_arrow_iterable (
15021501 self ,
You can’t perform that action at this time.
0 commit comments