@@ -133,25 +133,26 @@ def _initial_load(self) -> None:
133133 # obtain the row counts
134134 # TODO(b/428238610): Start iterating over the result of `to_pandas_batches()`
135135 # before we get here so that the count might already be cached.
136- self ._reset_batches_for_new_page_size ()
136+ with bigframes .option_context ("display.progress_bar" , None ):
137+ self ._reset_batches_for_new_page_size ()
137138
138- if self ._batches is None :
139- self ._error_message = (
140- "Could not retrieve data batches. Data might be unavailable or "
141- "an error occurred."
142- )
143- self .row_count = None
144- elif self ._batches .total_rows is None :
145- # Total rows is unknown, this is an expected state.
146- # TODO(b/461536343): Cheaply discover if we have exactly 1 page.
147- # There are cases where total rows is not set, but there are no additional
148- # pages. We could disable the "next" button in these cases.
149- self .row_count = None
150- else :
151- self .row_count = self ._batches .total_rows
139+ if self ._batches is None :
140+ self ._error_message = (
141+ "Could not retrieve data batches. Data might be unavailable or "
142+ "an error occurred."
143+ )
144+ self .row_count = None
145+ elif self ._batches .total_rows is None :
146+ # Total rows is unknown, this is an expected state.
147+ # TODO(b/461536343): Cheaply discover if we have exactly 1 page.
148+ # There are cases where total rows is not set, but there are no additional
149+ # pages. We could disable the "next" button in these cases.
150+ self .row_count = None
151+ else :
152+ self .row_count = self ._batches .total_rows
152153
153- # get the initial page
154- self ._set_table_html ()
154+ # get the initial page
155+ self ._set_table_html ()
155156
156157 @traitlets .observe ("_initial_load_complete" )
157158 def _on_initial_load_complete (self , change : dict [str , Any ]):
@@ -281,7 +282,9 @@ def _reset_batches_for_new_page_size(self) -> None:
281282 def _set_table_html (self ) -> None :
282283 """Sets the current html data based on the current page and page size."""
283284 new_page = None
284- with self ._setting_html_lock :
285+ with self ._setting_html_lock , bigframes .option_context (
286+ "display.progress_bar" , None
287+ ):
285288 if self ._error_message :
286289 self .table_html = (
287290 f"<div class='bigframes-error-message'>"
0 commit comments