2626import pytest
2727import shapely # type: ignore
2828
29+ import bigframes .features
2930import bigframes .pandas
3031import bigframes .series as series
3132from tests .system .utils import (
@@ -267,7 +268,18 @@ def test_series_construct_w_dtype_for_array_string():
267268 series = bigframes .pandas .Series (data , dtype = dtype )
268269 expected = pd .Series (data , dtype = dtype )
269270 expected .index = expected .index .astype ("Int64" )
270- pd .testing .assert_series_equal (series .to_pandas (), expected )
271+
272+ # Skip dtype check due to internal issue b/321013333. This issue causes array types
273+ # to be converted to the `object` dtype when calling `to_pandas()`, resulting in
274+ # a mismatch with the expected Pandas type.
275+ if bigframes .features .PANDAS_VERSIONS .is_arrow_list_dtype_usable :
276+ check_dtype = True
277+ else :
278+ check_dtype = False
279+
280+ pd .testing .assert_series_equal (
281+ series .to_pandas (), expected , check_dtype = check_dtype
282+ )
271283
272284
273285def test_series_construct_w_dtype_for_array_struct ():
@@ -276,7 +288,18 @@ def test_series_construct_w_dtype_for_array_struct():
276288 series = bigframes .pandas .Series (data , dtype = dtype )
277289 expected = pd .Series (data , dtype = dtype )
278290 expected .index = expected .index .astype ("Int64" )
279- pd .testing .assert_series_equal (series .to_pandas (), expected )
291+
292+ # Skip dtype check due to internal issue b/321013333. This issue causes array types
293+ # to be converted to the `object` dtype when calling `to_pandas()`, resulting in
294+ # a mismatch with the expected Pandas type.
295+ if bigframes .features .PANDAS_VERSIONS .is_arrow_list_dtype_usable :
296+ check_dtype = True
297+ else :
298+ check_dtype = False
299+
300+ pd .testing .assert_series_equal (
301+ series .to_pandas (), expected , check_dtype = check_dtype
302+ )
280303
281304
282305def test_series_keys (scalars_dfs ):
0 commit comments