Skip to content

Commit

Permalink
fix comments in BigQueryDataParser.java
Browse files Browse the repository at this point in the history
  • Loading branch information
DemoYeti authored and itsankit-google committed Sep 10, 2024
1 parent f157898 commit 29ef14a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ public static StructuredRecord getStructuredRecord(Schema schema, FieldList fiel
FieldList subFields = field.getSubFields();

if (attribute == Attribute.REPEATED) {
// Process each field of the array and then add it to the StructuredRecord
// Process each field of the array, then add it to the StructuredRecord
List<Object> list = new ArrayList<>();
List<FieldValue> fieldValueList = fieldValue.getRepeatedValue();

for (FieldValue localValue : fieldValueList) {
// If the field contains multiple fields then we have to process it recursively.
// If the field contains multiple fields, it must be processed recursively.
if (localValue.getValue() instanceof FieldValueList) {
FieldValueList localFieldValueListNoSchema = localValue.getRecordValue();
FieldValueList localFieldValueList =
Expand All @@ -105,7 +105,7 @@ public static StructuredRecord getStructuredRecord(Schema schema, FieldList fiel
recordBuilder.set(fieldName, list);

} else if (attribute == Attribute.RECORD) {
// If the field contains a Record then we need to process each field independently
// If the field contains a Record, each field must be processed independently.
FieldValue localValue = fieldValue;
Object value;
if (localValue.getValue() instanceof FieldValueList) {
Expand Down

0 comments on commit 29ef14a

Please sign in to comment.