-
Notifications
You must be signed in to change notification settings - Fork 128
Closed
Labels
api: bigqueryIssues related to the googleapis/java-bigquery API.Issues related to the googleapis/java-bigquery API.
Description
Environment details
I am using client version 2.6.1 from MVN: https://mvnrepository.com/artifact/com.google.cloud/google-cloud-bigquery/2.6.1
Steps to reproduce
Please simply run the code example below.
Code example
Field.newBuilder("abc", StandardSQLTypeName.ARRAY).build();
Stack trace
java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull (Preconditions.java:878)
at com.google.cloud.bigquery.Field.<init> (Field.java:256)
at com.google.cloud.bigquery.Field.<init> (Field.java:37)
at com.google.cloud.bigquery.Field$Builder.build (Field.java:250)
at com.google.changestreams.sample.bigquery.BigQueryClientTesting.main (BigQueryClientTesting.java:14)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:254)
at java.lang.Thread.run (Thread.java:829)
Any additional information below
It looks like the client is always trying to convert the Field type from StandardSQLTypeName to LegacySQLTypeName, but there isn't an ARRAY in LegacySQLTypeName, causing the type to be null, which shouldn't be. How do we specify ARRAY type then?
java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Field.java
Line 189 in dfa15e5
| public Builder setType(StandardSQLTypeName type, FieldList subFields) { |
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the googleapis/java-bigquery API.Issues related to the googleapis/java-bigquery API.