@@ -398,7 +398,7 @@ def read_gbq( # type: ignore[overload-overlap]
398398 use_cache : Optional [bool ] = ...,
399399 col_order : Iterable [str ] = ...,
400400 dry_run : Literal [False ] = ...,
401- allow_large_results : bool = ...,
401+ allow_large_results : Optional [ bool ] = ...,
402402 ) -> dataframe .DataFrame :
403403 ...
404404
@@ -415,7 +415,7 @@ def read_gbq(
415415 use_cache : Optional [bool ] = ...,
416416 col_order : Iterable [str ] = ...,
417417 dry_run : Literal [True ] = ...,
418- allow_large_results : bool = ...,
418+ allow_large_results : Optional [ bool ] = ...,
419419 ) -> pandas .Series :
420420 ...
421421
@@ -431,7 +431,7 @@ def read_gbq(
431431 use_cache : Optional [bool ] = None ,
432432 col_order : Iterable [str ] = (),
433433 dry_run : bool = False ,
434- allow_large_results : bool = True ,
434+ allow_large_results : Optional [ bool ] = None ,
435435 ) -> dataframe .DataFrame | pandas .Series :
436436 # TODO(b/281571214): Generate prompt to show the progress of read_gbq.
437437 if columns and col_order :
@@ -441,6 +441,9 @@ def read_gbq(
441441 elif col_order :
442442 columns = col_order
443443
444+ if allow_large_results is None :
445+ allow_large_results = bigframes ._config .options ._allow_large_results
446+
444447 if bf_io_bigquery .is_query (query_or_table ):
445448 return self ._loader .read_gbq_query ( # type: ignore # for dry_run overload
446449 query_or_table ,
@@ -527,6 +530,8 @@ def _read_gbq_colab(
527530 if pyformat_args is None :
528531 pyformat_args = {}
529532
533+ allow_large_results = bigframes ._config .options ._allow_large_results
534+
530535 query = bigframes .core .pyformat .pyformat (
531536 query ,
532537 pyformat_args = pyformat_args ,
@@ -539,10 +544,7 @@ def _read_gbq_colab(
539544 index_col = bigframes .enums .DefaultIndexKind .NULL ,
540545 force_total_order = False ,
541546 dry_run = typing .cast (Union [Literal [False ], Literal [True ]], dry_run ),
542- # TODO(tswast): we may need to allow allow_large_results to be overwritten
543- # or possibly a general configuration object for an explicit
544- # destination table and write disposition.
545- allow_large_results = False ,
547+ allow_large_results = allow_large_results ,
546548 )
547549
548550 @overload
0 commit comments