Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] FlightClient.do_action is a generator instead of returning one. #29832

Closed
asfimport opened this issue Oct 7, 2021 · 1 comment
Closed

Comments

@asfimport
Copy link

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(...)

Reporter: Alessandro Molina / @amol-
Assignee: Alessandro Molina / @amol-

PRs and other links:

Note: This issue was originally created as ARROW-14255. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Antoine Pitrou / @pitrou:
Issue resolved by pull request 11354
#11354

@asfimport asfimport added this to the 6.0.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants