File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -253,15 +253,14 @@ def _maybe_find_existing_table(
253
253
if spec .if_exists == "fail" :
254
254
raise ValueError (f"Table already exists: { spec .table .__str__ ()} " )
255
255
256
- if (
257
- (len (spec .cluster_cols ) != 0 )
258
- and (table .clustering_fields is not None )
259
- and (tuple (table .clustering_fields ) != spec .cluster_cols )
260
- ):
261
- raise ValueError (
262
- "Table clustering fields cannot be changed after the table has "
263
- f"been created. Requested clustering fields: { spec .cluster_cols } , existing clustering fields: { table .clustering_fields } "
264
- )
256
+ if len (spec .cluster_cols ) != 0 :
257
+ if (table .clustering_fields is None ) or (
258
+ tuple (table .clustering_fields ) != spec .cluster_cols
259
+ ):
260
+ raise ValueError (
261
+ "Table clustering fields cannot be changed after the table has "
262
+ f"been created. Requested clustering fields: { spec .cluster_cols } , existing clustering fields: { table .clustering_fields } "
263
+ )
265
264
return table
266
265
except google .api_core .exceptions .NotFound :
267
266
return None
You can’t perform that action at this time.
0 commit comments