-
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
doc: Array of Structure Query Code sample #2540
Conversation
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use -- conventional-commit-lint bot |
5ce6a03
to
9bf94f5
Compare
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
TableResult results = bigquery.query(queryConfig); | ||
results | ||
.iterateAll() | ||
.forEach(row -> row.forEach(val -> System.out.printf("%s", val.toString()))); |
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.
Check if this is printing the expected value.
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.
did you want me to add it as a part of the unit test?
currently it prints:
[INFO] Running com.example.bigquery.QueryWithArrayOfStructsNamedParametersIT
Mar 01, 2023 11:45:03 PM com.example.bigquery.QueryWithArrayOfStructsNamedParametersIT tearDown
INFO:
FieldValue{attribute=REPEATED, value=[FieldValue{attribute=PRIMITIVE, value=QueryParameterValue{value=null, arrayValuesInner=null, structValuesInner={stringField=QueryParameterValue{value=test-stringField, arrayValuesInner=null, structValuesInner=null, type=STRING, arrayType=null, structTypesInner=null}}, type=STRUCT, arrayType=null, structTypesInner={stringField=QueryParameterValue{value=test-stringField, arrayValuesInner=null, structValuesInner=null, type=STRING, arrayType=null, structTypesInner=null}}}}]}Query with Array of struct parameters performed successfully.
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.319 s - in com.example.bigquery.QueryWithArrayOfStructsNamedParametersIT
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.
This is good. LGTM
@@ -0,0 +1,68 @@ | |||
/* | |||
* Copyright 2020 Google LLC |
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.
Update License Year
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.
Done
@@ -0,0 +1,58 @@ | |||
/* | |||
* Copyright 2020 Google LLC |
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.
Update license year
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.
Done!
b25fc76
to
3116b76
Compare
nit: The conventional commit for samples is doc. |
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> ☕️
If you write sample code, please follow the samples format.