-
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.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.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
Environment details
- OS: Linux (Debian 9)
- Java version: openjdk version "1.8.0_181"
- google-cloud-java version(s): 1.52.0
Steps to reproduce
- Serialize StringEnumValue
- Deserialize StringEnumValue
- Use it in a way that requires reference equality
- Crash
Stacktrace
Exception in thread "main" java.lang.IllegalArgumentException: Only RECORD fields can have sub-fields
at com.google.cloud.bigquery.Field$Builder.setType(Field.java:137)
at com.google.cloud.bigquery.Field.newBuilder(Field.java:275)
at com.google.cloud.bigquery.Field.of(Field.java:261)
at App.main(App.java:27)
Code snippet
LegacySQLTypeName record = SerializationUtils.clone(LegacySQLTypeName.RECORD);
System.out.println(LegacySQLTypeName.RECORD == record); // false
Field.of("foo", record, Field.of("bar", LegacySQLTypeName.BOOLEAN)); // throwsMetadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.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.