Skip to content

Commit

Permalink
fix: use outputFieldName instead of innerFieldName for output field (j…
Browse files Browse the repository at this point in the history
…custenborder#109)

Co-authored-by: Jason Separovic <[email protected]>
  • Loading branch information
jseparovic and Jason Separovic authored Jan 20, 2024
1 parent b780a27 commit 1bde822
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected SchemaAndValue processStruct(R record, Schema inputSchema, Struct inpu
for (Field inputField : inputSchema.fields()) {
builder.field(inputField.name(), inputField.schema());
}
builder.field(this.config.innerFieldName, innerField.schema());
builder.field(this.config.outputFieldName, innerField.schema());
return builder.build();
});
final Struct outputStruct = new Struct(outputSchema);
Expand All @@ -80,7 +80,7 @@ protected SchemaAndValue processStruct(R record, Schema inputSchema, Struct inpu
outputStruct.put(inputField.name(), value);
}
final Object innerFieldValue = innerStruct.get(this.config.innerFieldName);
outputStruct.put(this.config.innerFieldName, innerFieldValue);
outputStruct.put(this.config.outputFieldName, innerFieldValue);

return new SchemaAndValue(outputSchema, outputStruct);

Expand Down

0 comments on commit 1bde822

Please sign in to comment.