tadeja opened a new issue, #55499: URL: https://github.com/apache/arrow/issues/55499
### Describe the enhancement requested `pyarrow.array()` returns `Array` except for two cases when it returns `ChunkedArray`: - `string`/`binary` data overflows the 32-bit offsets (more than 2 GB) or - the object’s `__arrow_array__` returns a `ChunkedArray` with more than one chunk Callers almost always expect an `Array`, so this is easy to miss. It also cannot be annotated well in the stubs - #55264 `Array | ChunkedArray` would force casts in most user code, so `array()` currently annotated as returning `ArrayLike` ~ `Any`. As suggested by @jorisvandenbossche in https://github.com/apache/arrow/pull/55264#discussion_r4485589838 - long term this might be something we want to solve in the runtime, e.g. a keyword to indicate that a `ChunkedArray` return is allowed, but by default errors on it. ### Component(s) Python -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
