milesgranger commented on code in PR #14698:
URL: https://github.com/apache/arrow/pull/14698#discussion_r1029718574
##########
python/pyarrow/_flight.pyx:
##########
@@ -1548,6 +1548,9 @@ cdef class FlightClient(_Weakrefable):
writer : FlightStreamWriter
reader : FlightMetadataReader
"""
+ if schema is None:
Review Comment:
Yes, the `not None` is nice, I initially used it in a previous PR but it was
advised to raise a more informative error; I can make the switch back here.
> Also, in general I question if pyarrow_unwrap_schema et al should accept
None by default, it seems such errors would be caught if they raised and
translating None to nullptr had to be opt in
I checked the impl of `pyarrow_unwrap_schema` and it seems quite decisive in
it's willingness to return an empty pointer so left it alone; it anyway maps
nice enough from Python's `None` to `nullptr` in it's current form.
:sweat_smile:
> Finally, it seems the C++ side should guard against nullptr better too
Agreed, I'll try to make that better in this PR, thanks. :)
--
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]