You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Python][Annotations] Consider improving stubs for chunked inputs and string/bytes key mappings #55782
Follow-up to #55264, under umbrella #32609. Type annotations stubs should match existing runtime behaviors:
Array.take(), Array.filter() and Array.fill_null() return a ChunkedArray when given chunked indices, a chunked mask or a chunked fill value. The stubs currently declare Self.
RecordBatch.take() raises ArrowNotImplementedError for chunked indices, but its stub accepts them. Table.take() supports chunked indices and should keep accepting them.
metadata= (on pa.table(), pa.record_batch(), from_pydict(), from_pylist()) and the fields argument of pa.schema() / pa.struct() reject variables typed as dict[str, ...] or dict[bytes, ...], because Mapping[str | bytes, ...] is invariant in its key type (_MetadataMapping from types.pyi could be reused). Runtime accepts them.
Update type annotation stubs and their regression tests. No runtime code change needed.
Activity