Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/java-bigquerystorage
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ef1f1d65211bb65bc289407edf124f9b1e424d9c
Choose a base ref
..
head repository: googleapis/java-bigquerystorage
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 45b02f4afe7397861e7ef691eebc3a99f8c52441
Choose a head ref
Showing with 9 additions and 3 deletions.
  1. +1 −1 README.md
  2. +8 −2 ...-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/BigQuerySchemaUtil.java
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ If you are using Maven without the BOM, add this to your dependencies:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquerystorage</artifactId>
<version>3.10.0</version>
<version>3.9.3</version>
</dependency>

```
Original file line number Diff line number Diff line change
@@ -15,7 +15,9 @@
*/
package com.google.cloud.bigquery.storage.v1;

import com.google.protobuf.DescriptorProtos.FieldOptions;
import com.google.protobuf.Descriptors.FieldDescriptor;
import com.google.protobuf.ExtensionLite;
import java.nio.charset.StandardCharsets;
import java.util.Base64;

@@ -74,8 +76,12 @@ public static String generatePlaceholderFieldName(String fieldName) {
* @return columnName annotation if present, otherwise return the field name.
*/
public static String getFieldName(FieldDescriptor fieldDescriptor) {
return fieldDescriptor.getOptions().hasExtension(AnnotationsProto.columnName)
? fieldDescriptor.getOptions().getExtension(AnnotationsProto.columnName)
return fieldDescriptor
.getOptions()
.hasExtension((ExtensionLite<FieldOptions, String>) AnnotationsProto.columnName)
? fieldDescriptor
.getOptions()
.getExtension((ExtensionLite<FieldOptions, String>) AnnotationsProto.columnName)
: fieldDescriptor.getName();
}
}