Class Resolver.ReaderUnion

java.lang.Object
org.apache.avro.Resolver.Action
org.apache.avro.Resolver.ReaderUnion
Enclosing class:
Resolver

public static class Resolver.ReaderUnion extends Resolver.Action
In this case, the reader is a union and the writer is not. For this case, we need to pick the first branch of the reader that matches the writer and pretend to the reader that the index of this branch was found in the writer's data stream. To support this case, the Resolver.ReaderUnion object has two (public) fields: firstMatch gives the index of the first matching branch in the reader's schema, and actualResolution is the Resolver.Action that resolves the writer's schema with the schema found in the firstMatch branch of the reader's schema.