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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to