-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
I recently ran an invalid job outside of the Java BigQuery client library, and when I try to list jobs when running the BigQuery samples tests with the Java client library, I get an error:
Running com.google.cloud.examples.bigquery.snippets.ITBigQuerySnippets
Tests run: 15, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 162.203 sec <<< FAILURE! - in com.google.cloud.examples.bigquery.snippets.ITBigQuerySnippets
testJob(com.google.cloud.examples.bigquery.snippets.ITBigQuerySnippets) Time elapsed: 1.602 sec <<< ERROR!
java.lang.IllegalArgumentException: value must be set if and only if the type is not ARRAY
at com.google.cloud.examples.bigquery.snippets.ITBigQuerySnippets.testJob(ITBigQuerySnippets.java:273)
This error comes from from the Java BigQuery client library when it attempts to build an invalid job (error defined here)
This issue is similar to one we fixed in Python. The solution we used was to not validate Job objects as they are created from the API, which allowed invalid jobs from the API to be constructed into Job objects.
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.