-
Notifications
You must be signed in to change notification settings - Fork 119
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: Add queryId to TableResult #3106
Conversation
Please let me know if it's not advisable to update the constructor for TableResult. |
I recommend asking on a Java chat. This may be considered a breaking change. |
Just verified, since the constructors are annotated with |
google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java
Show resolved
Hide resolved
google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java
Show resolved
Hide resolved
/** | ||
* If {@code schema} is non-null, {@code TableResult} adds the schema to {@code FieldValueList}s | ||
* when iterating through them. {@code pageNoSchema} must not be null. | ||
*/ | ||
@InternalApi("Exposed for testing") | ||
public TableResult(Schema schema, long totalRows, Page<FieldValueList> pageNoSchema) { | ||
public TableResult( |
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.
Rather than solely extending the existing constructor, should we just provide an second signature or a builder? It would mean you can avoid having to touch all the callsites where queryId isn't relevant for construction.
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.
As discussed offline. I think creating a builder would be the preferred option. I'll follow up with another PR to switch to using a builder.
This PR adds queryId to TableResult by changing its public constructors. It should be fine to update TableResult constructors to include QueryId since it is used to return results to the user and users should not directly construct TableResult objects.
Fixes #3105 ☕️