public static class Resolver.ReaderUnion extends Resolver.Action
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.Resolver.Action.Type
Modifier and Type | Field and Description |
---|---|
Resolver.Action |
actualAction |
int |
firstMatch |
conversion, logicalType, reader, type, writer
Constructor and Description |
---|
ReaderUnion(Schema w,
Schema r,
GenericData d,
int firstMatch,
Resolver.Action actual) |
Modifier and Type | Method and Description |
---|---|
static Resolver.Action |
resolve(Schema w,
Schema r,
GenericData d,
Map<Schema.SeenPair,Resolver.Action> seen)
Returns a
Resolver.ReaderUnion action for resolving w and r,
or an Resolver.ErrorAction if there is no branch in the reader that matches
the writer. |
public final int firstMatch
public final Resolver.Action actualAction
public ReaderUnion(Schema w, Schema r, GenericData d, int firstMatch, Resolver.Action actual)
public static Resolver.Action resolve(Schema w, Schema r, GenericData d, Map<Schema.SeenPair,Resolver.Action> seen)
Resolver.ReaderUnion
action for resolving w and r,
or an Resolver.ErrorAction
if there is no branch in the reader that matches
the writer.RuntimeException
- if r is not a union schema or w
is a union schemaCopyright © 2009–2021 The Apache Software Foundation. All rights reserved.