Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AVRO-4071: put the recorde schema to the context after adding the fields #3206

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lang/java/avro/src/main/java/org/apache/avro/Schema.java
Original file line number Diff line number Diff line change
Expand Up @@ -1862,7 +1862,6 @@ private static Schema parseRecord(JsonNode schema, ParseContext context, String
Name name = parseName(schema, currentNameSpace);
String doc = parseDoc(schema);
Schema result = new RecordSchema(name, doc, isTypeError);
context.put(result);

JsonNode fieldsNode = schema.get("fields");
if (fieldsNode == null || !fieldsNode.isArray())
Expand All @@ -1877,6 +1876,7 @@ private static Schema parseRecord(JsonNode schema, ParseContext context, String
name, f.name(), getOptionalText(field, "logicalType"));
}
result.setFields(fields);
context.put(result);
parsePropertiesAndLogicalType(schema, result, SCHEMA_RESERVED);
parseAliases(schema, result);
return result;
Expand Down
Loading