-
Notifications
You must be signed in to change notification settings - Fork 313
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
feat: support setting max_stream_count when fetching query result #2051
Conversation
@@ -1836,6 +1837,17 @@ def to_arrow_iterable( | |||
created by the server. If ``max_queue_size`` is :data:`None`, the queue | |||
size is infinite. | |||
|
|||
max_stream_count (Optional[int]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be more consistent if we use the same docstring as here. It also mentions the effect of preserve_order
(in this case self._preserve_order
), which I think we should make clear here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, _preserve_order
is automatically set by parsing the queries, and not a user-facing API. I'll update the docstring to mention that effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
@@ -2008,6 +2022,17 @@ def to_dataframe_iterable( | |||
|
|||
.. versionadded:: 2.14.0 | |||
|
|||
max_stream_count (Optional[int]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @kien-truong for adding further support for |
Hi, the default code path with the default arguments is already covered by the current tests. |
@kien-truong sounds good. The mypy test is also failing, could you fix it too? You can run it by running |
31662ad
to
0e52722
Compare
Allow user to set max_stream_count when fetching result using BigQuery Storage API with RowIterator's incremental methods: * to_arrow_iterable * to_dataframe_iterable
0e52722
to
fb726eb
Compare
I have added tests to cover user-provided |
Thanks @kien-truong, the PR mostly looks good. I just have some small question regarding ignored coverage for the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you!
Allow user to set max_stream_count when fetching result using BigQuery Storage API with incremental methods:
Fixes #2030 🦕