@@ -196,13 +196,13 @@ def _from_sequence(
196
196
na_values = scalars ._mask
197
197
result = scalars ._data
198
198
result = lib .ensure_string_array (result , copy = copy , convert_na_value = False )
199
- return cls (pa .array (result , mask = na_values , type = pa .string ()))
199
+ return cls (pa .array (result , mask = na_values , type = pa .large_string ()))
200
200
elif isinstance (scalars , (pa .Array , pa .ChunkedArray )):
201
- return cls (pc .cast (scalars , pa .string ()))
201
+ return cls (pc .cast (scalars , pa .large_string ()))
202
202
203
203
# convert non-na-likes to str
204
204
result = lib .ensure_string_array (scalars , copy = copy )
205
- return cls (pa .array (result , type = pa .string (), from_pandas = True ))
205
+ return cls (pa .array (result , type = pa .large_string (), from_pandas = True ))
206
206
207
207
@classmethod
208
208
def _from_sequence_of_strings (
@@ -245,7 +245,7 @@ def isin(self, values: ArrayLike) -> npt.NDArray[np.bool_]:
245
245
value_set = [
246
246
pa_scalar .as_py ()
247
247
for pa_scalar in [pa .scalar (value , from_pandas = True ) for value in values ]
248
- if pa_scalar .type in (pa .string (), pa .null ())
248
+ if pa_scalar .type in (pa .string (), pa .null (), pa . large_string () )
249
249
]
250
250
251
251
# short-circuit to return all False array.
@@ -332,7 +332,9 @@ def _str_map(
332
332
result = lib .map_infer_mask (
333
333
arr , f , mask .view ("uint8" ), convert = False , na_value = na_value
334
334
)
335
- result = pa .array (result , mask = mask , type = pa .string (), from_pandas = True )
335
+ result = pa .array (
336
+ result , mask = mask , type = pa .large_string (), from_pandas = True
337
+ )
336
338
return type (self )(result )
337
339
else :
338
340
# This is when the result type is object. We reach this when
@@ -655,7 +657,9 @@ def _str_map(
655
657
result = lib .map_infer_mask (
656
658
arr , f , mask .view ("uint8" ), convert = False , na_value = na_value
657
659
)
658
- result = pa .array (result , mask = mask , type = pa .string (), from_pandas = True )
660
+ result = pa .array (
661
+ result , mask = mask , type = pa .large_string (), from_pandas = True
662
+ )
659
663
return type (self )(result )
660
664
else :
661
665
# This is when the result type is object. We reach this when
0 commit comments