arrow icon indicating copy to clipboard operation
arrow copied to clipboard

[Python] IPC and Flight options lack a nice repr/str

Open pitrou opened this issue 1 year ago • 7 comments

Describe the enhancement requested

These could really be improved:

>>> from pyarrow import ipc
>>> from pyarrow import flight

>>> ipc.IpcReadOptions(ensure_alignment=ipc.Alignment.At64Byte)
<pyarrow.lib.IpcReadOptions at 0x7cc4a8381ed0>
>>> ipc.IpcWriteOptions(compression="zstd")
<pyarrow.lib.IpcWriteOptions at 0x7cc588ba28b0>
>>> flight.FlightCallOptions(read_options=ipc.IpcReadOptions(ensure_alignment=ipc.Alignment.DataTypeSpecific))
<pyarrow._flight.FlightCallOptions at 0x7cc588d9da30>

Component(s)

Python

pitrou avatar Aug 18 '25 13:08 pitrou

cc @thisisnic @AlenkaF

pitrou avatar Aug 18 '25 13:08 pitrou

Hey @pitrou ! I'd like to work on this issue :) Do you have any mock representation you'd like to see implemented? Thanks!

rmnskb avatar Aug 21 '25 09:08 rmnskb

No particular suggestions, no. Perhaps pyarrow.ipc.IpcWriteOptions(compression="zstd", ...) would work?

cc @jorisvandenbossche for suggestions.

pitrou avatar Aug 21 '25 09:08 pitrou

Similar issue: https://github.com/apache/arrow/issues/47389

pitrou avatar Aug 21 '25 09:08 pitrou

take

rmnskb avatar Aug 21 '25 09:08 rmnskb

No particular suggestions, no. Perhaps pyarrow.ipc.IpcWriteOptions(compression="zstd", ...) would work?

cc @jorisvandenbossche for suggestions.

Ok, I see, thanks! I will work on the issue, and will look through existing implementations for consistency.

rmnskb avatar Aug 21 '25 09:08 rmnskb

Issue resolved by pull request 47461 https://github.com/apache/arrow/pull/47461

AlenkaF avatar Sep 22 '25 08:09 AlenkaF