You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Alessandro Molina (Jira)" <ji...@apache.org> on 2021/10/07 14:14:00 UTC
[jira] [Created] (ARROW-14255) [Python] FlightClient.do_action is a
generator instead of returning one.
Alessandro Molina created ARROW-14255:
-----------------------------------------
Summary: [Python] FlightClient.do_action is a generator instead of returning one.
Key: ARROW-14255
URL: https://issues.apache.org/jira/browse/ARROW-14255
Project: Apache Arrow
Issue Type: Bug
Components: Python
Affects Versions: 5.0.0
Reporter: Alessandro Molina
Fix For: 6.0.0
According to the documentation ( https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightClient.html#pyarrow.flight.FlightClient.do_action ) I would expect to be able to invoke {{client.do_action}} and get back an iterator. While it seems that the function is in fact a generator itself.
This makes a big difference because if it returns an iterator I expect to be able to do {{client.do_action(...)}} and just ignore the result if I don't care. But if it's a generator ignoring the results makes so that it actually doesn't get invoked at all and thus that the server won't do anything.
It would make sense to make {{do_action}} return a generator instead of being a generator itself, that would keep backward compatibility and would avoid puzzled users that don't see their code being invoked when they do {{client.do_action(...)}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)