paleolimbot commented on issue #40648: URL: https://github.com/apache/arrow/issues/40648#issuecomment-2008617788
> Does pyarrow.array ever return a ChunkedArray? ```python import pyarrow as pa type(pa.array(["a" * 2 ** 20 for _ in range(2**10)])) #> pyarrow.lib.StringArray type(pa.array(["a" * 2 ** 20 for _ in range(2**11)])) #> pyarrow.lib.ChunkedArray ``` This is also true of the [`__arrow_array__` protocol](https://arrow.apache.org/docs/python/extending_types.html#controlling-conversion-to-pyarrow-array-with-the-arrow-array-protocol). > I'm not sure which overload a type checker would pick if the input object had both dunder methods. Would the typing hints be significantly different for a `ChunkedPointArray` vs a `PointArray`? > So your argument is that Array should never have __arrow_c_stream__, but that ChunkedArray should have both __arrow_c_array__ and __arrow_c_stream__? Maybe *could* is more like it. pyarrow has an `Array` class for a specifically contiguous array...nanoarrow doesn't at the moment (at least in a user-facing nicely typed sort of way). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org