You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/10/12 09:23:33 UTC
[GitHub] [arrow] amol- commented on a change in pull request #11354: ARROW-14255: [Python] Fix FlightClient.do_action
amol- commented on a change in pull request #11354:
URL: https://github.com/apache/arrow/pull/11354#discussion_r726931991
##########
File path: python/pyarrow/_flight.pyx
##########
@@ -1950,6 +1954,9 @@ cdef CStatus _do_action(void* self, const CServerCallContext& context,
return (<FlightError> flight_error).to_status()
# Let the application return an iterator or anything convertible
# into one
+ if responses is None:
Review comment:
It happens when the `do_action` provides no return value or returns `None`.
In the example we don't notice this because one of the `if` branches has a `yield` thus the whole function becomes a generator ( https://github.com/apache/arrow/blob/master/python/examples/flight/server.py#L107 ).
But for example the provided test leverages this case here -> https://github.com/apache/arrow/pull/11354/files#diff-0dd3da22896cf6837802f4024280d8160fc9cf3e5dd734c5666817b797fa8efbR2033
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org