public static class Resolver.Promote extends Resolver.Action
resolve(org.apache.avro.Schema, org.apache.avro.Schema, org.apache.avro.generic.GenericData), which will only construct one when the writer's and reader's schemas are different (ie, no "self promotion"), and whent the promotion is one allowed by the Avro spec.
|Modifier and Type||Method and Description|
Returns true iff w and r are both primitive types and either they are the same type or w is promotable to r.
Return a promotion.
public static Resolver.Action resolve(Schema w, Schema r, GenericData d)
w- Writer's schema
r- Rearder's schema
Resolver.Promoteschema if the two schemas are compatible, or
Resolver.ErrorAction.ErrorType.INCOMPATIBLE_SCHEMA_TYPESif they are not.
IllegalArgumentException- if getType() of the two schemas are not different.
Copyright © 2009–2021 The Apache Software Foundation. All rights reserved.