Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
rzhang10 committed Mar 11, 2024
1 parent 0c0f44f commit aa412e4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,10 @@ public Schema primitive(PrimitiveTypeInfo primitive, Schema partner) {
shouldResultBeOptional && AvroSchemaUtil.getNullIndexInUnion(partner) == 1;
Schema hivePrimitive = hivePrimitiveToAvro(primitive);
// if there was no matching Avro primitive, use the Hive primitive
Schema result = partner == null ? hivePrimitive : checkCompatibilityAndPromote(hivePrimitive, partner);
return shouldResultBeOptional ? AvroSchemaUtil.toOption(result, nullShouldBeSecondElementInOptionalUnionSchema) : result;
Schema result =
partner == null ? hivePrimitive : checkCompatibilityAndPromote(hivePrimitive, partner);
return shouldResultBeOptional ? AvroSchemaUtil.toOption(result,
nullShouldBeSecondElementInOptionalUnionSchema) : result;
}

private Schema checkCompatibilityAndPromote(Schema schema, Schema partner) {
Expand Down

0 comments on commit aa412e4

Please sign in to comment.