@@ -399,6 +399,7 @@ def get_struct_fields(type_: ExpressionType) -> dict[str, Dtype]:
399399
400400 # Local import to break circular dependency with core.backports
401401 import bigframes .core .backports
402+
402403 for field in bigframes .core .backports .pyarrow_struct_type_fields (struct_type ):
403404 result [field .name ] = arrow_dtype_to_bigframes_dtype (field .type )
404405 return result
@@ -587,6 +588,7 @@ def to_storage_type(
587588
588589 # Local import to break circular dependency with core.backports
589590 import bigframes .core .backports
591+
590592 return pa .struct (
591593 field .with_type (to_storage_type (field .type ))
592594 for field in bigframes .core .backports .pyarrow_struct_type_fields (arrow_type )
@@ -603,6 +605,7 @@ def arrow_type_to_literal(
603605
604606 # Local import to break circular dependency with core.backports
605607 import bigframes .core .backports
608+
606609 if pa .types .is_struct (arrow_type ):
607610 return {
608611 field .name : arrow_type_to_literal (field .type )
@@ -1011,6 +1014,7 @@ def contains_db_dtypes_json_arrow_type(type_):
10111014 if isinstance (type_ , pa .StructType ):
10121015 # Local import to break circular dependency with core.backports
10131016 import bigframes .core .backports
1017+
10141018 return any (
10151019 contains_db_dtypes_json_arrow_type (field .type )
10161020 for field in bigframes .core .backports .pyarrow_struct_type_fields (type_ )
0 commit comments