File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -82,12 +82,15 @@ def metadata(self) -> bigframes.series.Series:
8282 bigframes.series.Series: JSON metadata of the Blob. Contains fields: content_type, md5_hash, size and updated(time)."""
8383 series_to_check = bigframes .series .Series (self ._block )
8484 # Check if it's a struct series from a verbose operation
85- if (
86- dtypes .is_struct_like (series_to_check .dtype )
87- and "content" in series_to_check .dtype .names
88- and dtypes .is_blob_like (series_to_check .dtype .field ("content" ).dtype )
89- ):
90- series_to_check = series_to_check .struct .field ("content" )
85+ if dtypes .is_struct_like (series_to_check .dtype ):
86+ pyarrow_dtype = series_to_check .dtype .pyarrow_dtype
87+ if "content" in pyarrow_dtype .names :
88+ content_field_type = pyarrow_dtype .field ("content" ).type
89+ content_bf_type = dtypes .arrow_dtype_to_bigframes_dtype (
90+ content_field_type
91+ )
92+ if content_bf_type == dtypes .OBJ_REF_DTYPE :
93+ series_to_check = series_to_check .struct .field ("content" )
9194 details_json = series_to_check ._apply_unary_op (
9295 ops .obj_fetch_metadata_op
9396 ).struct .field ("details" )
You can’t perform that action at this time.
0 commit comments