File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
bigframes/session/_io/bigquery Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,10 @@ def get_index_cols(
250250 column(s), then return those too so that ordering generation can be
251251 avoided.
252252 """
253+ # Transform index_col -> index_cols so we have a variable that is
254+ # always a list of column names (possibly empty).
255+ schema_len = len (table .schema )
256+
253257 index_cols : List [str ] = []
254258 if isinstance (index_col , bigframes .enums .DefaultIndexKind ):
255259 if index_col == bigframes .enums .DefaultIndexKind .SEQUENTIAL_INT64 :
@@ -265,14 +269,7 @@ def get_index_cols(
265269 raise NotImplementedError (
266270 f"Got unexpected index_col { repr (index_col )} . { constants .FEEDBACK_LINK } "
267271 )
268- elif isinstance (index_col , Iterable ) and len (list (index_col )) == 0 :
269- return []
270-
271- # Transform index_col -> index_cols so we have a variable that is
272- # always a list of column names (possibly empty).
273- schema_len = len (table .schema )
274-
275- if isinstance (index_col , str ):
272+ elif isinstance (index_col , str ):
276273 if rename_to_schema is not None :
277274 index_col = rename_to_schema .get (index_col , index_col )
278275 index_cols = [index_col ]
You can’t perform that action at this time.
0 commit comments