@@ -106,8 +106,6 @@ def execute(
106106 * ,
107107 ordered : bool = True ,
108108 use_explicit_destination : Optional [bool ] = None ,
109- page_size : Optional [int ] = None ,
110- max_results : Optional [int ] = None ,
111109 ) -> executor .ExecuteResult :
112110 if use_explicit_destination is None :
113111 use_explicit_destination = bigframes .options .bigquery .allow_large_results
@@ -127,8 +125,6 @@ def execute(
127125 return self ._execute_plan (
128126 plan ,
129127 ordered = ordered ,
130- page_size = page_size ,
131- max_results = max_results ,
132128 destination = destination_table ,
133129 )
134130
@@ -281,8 +277,6 @@ def _run_execute_query(
281277 sql : str ,
282278 job_config : Optional [bq_job .QueryJobConfig ] = None ,
283279 api_name : Optional [str ] = None ,
284- page_size : Optional [int ] = None ,
285- max_results : Optional [int ] = None ,
286280 query_with_job : bool = True ,
287281 ) -> Tuple [bq_table .RowIterator , Optional [bigquery .QueryJob ]]:
288282 """
@@ -303,8 +297,6 @@ def _run_execute_query(
303297 sql ,
304298 job_config = job_config ,
305299 api_name = api_name ,
306- max_results = max_results ,
307- page_size = page_size ,
308300 metrics = self .metrics ,
309301 query_with_job = query_with_job ,
310302 )
@@ -479,16 +471,13 @@ def _execute_plan(
479471 self ,
480472 plan : nodes .BigFrameNode ,
481473 ordered : bool ,
482- page_size : Optional [int ] = None ,
483- max_results : Optional [int ] = None ,
484474 destination : Optional [bq_table .TableReference ] = None ,
485475 peek : Optional [int ] = None ,
486476 ):
487477 """Just execute whatever plan as is, without further caching or decomposition."""
488478
489479 # First try to execute fast-paths
490- # TODO: Allow page_size and max_results by rechunking/truncating results
491- if (not page_size ) and (not max_results ) and (not destination ) and (not peek ):
480+ if (not destination ) and (not peek ):
492481 for semi_executor in self ._semi_executors :
493482 maybe_result = semi_executor .execute (plan , ordered = ordered )
494483 if maybe_result :
@@ -504,20 +493,12 @@ def _execute_plan(
504493 iterator , query_job = self ._run_execute_query (
505494 sql = sql ,
506495 job_config = job_config ,
507- page_size = page_size ,
508- max_results = max_results ,
509496 query_with_job = (destination is not None ),
510497 )
511498
512499 # Though we provide the read client, iterator may or may not use it based on what is efficient for the result
513500 def iterator_supplier ():
514- # Workaround issue fixed by: https://github.com/googleapis/python-bigquery/pull/2154
515- if iterator ._page_size is not None or iterator .max_results is not None :
516- return iterator .to_arrow_iterable (bqstorage_client = None )
517- else :
518- return iterator .to_arrow_iterable (
519- bqstorage_client = self .bqstoragereadclient
520- )
501+ return iterator .to_arrow_iterable (bqstorage_client = self .bqstoragereadclient )
521502
522503 if query_job :
523504 size_bytes = self .bqclient .get_table (query_job .destination ).num_bytes
0 commit comments