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.
Check if this is printing the expected value.
There was a problem hiding this comment.
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
| @@ -0,0 +1,68 @@ | |||
| /* | |||
| * Copyright 2020 Google LLC | |||
| @@ -0,0 +1,58 @@ | |||
| /* | |||
| * Copyright 2020 Google LLC | |||
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.