apache / arrow

Apache Arrow is a multi-language toolbox for accelerated data interchange and in-memory processing
https://arrow.apache.org/
Apache License 2.0
14.28k stars 3.47k forks source link

[Python] Add FlightSql client bindings #40168

Open danepitkin opened 6 months ago

danepitkin commented 6 months ago

Describe the enhancement requested

PyArrow currently only implements bindings to Arrow Flight RPC (not Arrow Flight SQL). There already exists a python Flight SQL driver in the ADBC repo[1]. We can implement a python Flight SQL client in PyArrow by wrapping the Arrow C++ Flight SQL client. The PyArrow Flight RPC implementation is here[2] for reference.

[1]https://github.com/apache/arrow-adbc/tree/main/python/adbc_driver_flightsql [2]https://github.com/apache/arrow/blob/main/python/pyarrow/flight.py

Component(s)

Python

jorisvandenbossche commented 6 months ago

For reference, the C++ Client is defined here:

https://github.com/apache/arrow/blob/40a8a68c7c3903e2bad98605d82339460c5ea930/cpp/src/arrow/flight/sql/client.h#L44-L51

(added in the original Flight SQL PR https://github.com/apache/arrow/pull/12013)