-
Notifications
You must be signed in to change notification settings - Fork 72
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
make ResultSet more general #97
Conversation
I have integrated your other PRs and published a new version of the crate. However, there are numerous conflicts with this latest PR. Could you adapt this PR to the changes made? Thank you in advance. Version v0.22.0 available on crates.io. |
@lquerel Thanks for publishing the new version. I have cleaned up this PR's code and it compiles. Looking at why tests and clippy are failing. |
Looks like clippy and tests failed because protoc is missing: https://github.com/lquerel/gcp-bigquery-client/actions/runs/9835163714/job/27148284036?pr=97#step:5:406. I'm not sure why it wasn't a problem before. |
Tests and clippy are fixed in #98. Once that PR is merged, this one should be green. |
I will work on this PR this weekend. |
I left a question/request for you (on a previous PR) that I need to address before I can devote time to this specific PR. It’s probably a gross error on my part, but I don’t understand what’s happening. |
I’d like to avoid making this type of breaking change on such common methods if possible. Why not convert the |
Thank for this.
One reason is that for my code example (in the description of the PR) to work it needs access to the
Which one do you think is the best? |
@imor I’ve taken the time to reflect on this change, and I believe that, in the long term, you are right. It is preferable to make the API more consistent, even if it means introducing a breaking change. Could you please add an update to the CHANGELOG.md in your pull request, including a notification about the breaking change, the rationale behind it, and instructions on how to migrate? Additionally, the main README.md example should be updated, with a notification at the beginning indicating the breaking change and linking to the changelog for details. Moreover, with my current activities, I am struggling to dedicate enough time to this library and am looking for two co-maintainers to help evolve and maintain it. Would you be interested? |
@lquerel Apologies for replying late, was quite busy this week. I've updated CHANGELOG.md and README.md files.
I probably won't be able to spend time developing major new features or refactorings, but I'm happy to help review PRs, or commit other minor fixes etc. |
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
New version 0.24.0 available on crates.io. Thank you for your contribution and sorry for the delay. |
NOTE: review and merge the following PR first: #96. This is because this PR's branch is cut from the previous PR's branch.
This PR makes
ResultSet
more general by only holding onto aVec<TableRow>
instead of aQueryResponse
. This change makes it possible to create aResultSet
not only from aQueryResponse
but also from aGetQueryResultsResponse
. Need for this arose when I wanted to create a single function which will first callJobApi::query
and if it returnsjob_complete=false
then fall back to pollingJobApi::get_query_results
to get the results when the query job finishes. Such a function needed the ability to create aResultSet
from the results of either of these APIs. This is the function I wrote that uses the refactored code:Note: This is a breaking API change, so should be included only in a major version bumped release.