public class IndexByName extends TypeUtil.SchemaVisitor<java.util.Map<java.lang.String,java.lang.Integer>>
Constructor and Description |
---|
IndexByName() |
IndexByName(java.util.function.Function<java.lang.String,java.lang.String> quotingFunc) |
Modifier and Type | Method and Description |
---|---|
void |
afterField(Types.NestedField field) |
void |
afterListElement(Types.NestedField elementField) |
void |
afterMapKey(Types.NestedField keyField) |
void |
afterMapValue(Types.NestedField valueField) |
void |
beforeField(Types.NestedField field) |
void |
beforeListElement(Types.NestedField elementField) |
void |
beforeMapKey(Types.NestedField keyField) |
void |
beforeMapValue(Types.NestedField valueField) |
java.util.Map<java.lang.Integer,java.lang.String> |
byId()
Returns a mapping from field ID to full name.
|
java.util.Map<java.lang.String,java.lang.Integer> |
byName()
Returns a mapping from full field name to ID.
|
java.util.Map<java.lang.String,java.lang.Integer> |
field(Types.NestedField field,
java.util.Map<java.lang.String,java.lang.Integer> fieldResult) |
java.util.Map<java.lang.String,java.lang.Integer> |
list(Types.ListType list,
java.util.Map<java.lang.String,java.lang.Integer> elementResult) |
java.util.Map<java.lang.String,java.lang.Integer> |
map(Types.MapType map,
java.util.Map<java.lang.String,java.lang.Integer> keyResult,
java.util.Map<java.lang.String,java.lang.Integer> valueResult) |
java.util.Map<java.lang.String,java.lang.Integer> |
primitive(Type.PrimitiveType primitive) |
java.util.Map<java.lang.String,java.lang.Integer> |
schema(Schema schema,
java.util.Map<java.lang.String,java.lang.Integer> structResult) |
java.util.Map<java.lang.String,java.lang.Integer> |
struct(Types.StructType struct,
java.util.List<java.util.Map<java.lang.String,java.lang.Integer>> fieldResults) |
public IndexByName()
public IndexByName(java.util.function.Function<java.lang.String,java.lang.String> quotingFunc)
public java.util.Map<java.lang.String,java.lang.Integer> byName()
Short names for maps and lists are included for any name that does not conflict with a canonical name. For example, a list, 'l', of structs with field 'x' will produce short name 'l.x' in addition to canonical name 'l.element.x'.
public java.util.Map<java.lang.Integer,java.lang.String> byId()
Canonical names, not short names are returned, for example 'list.element.field' instead of 'list.field'.
public void beforeField(Types.NestedField field)
beforeField
in class TypeUtil.SchemaVisitor<java.util.Map<java.lang.String,java.lang.Integer>>
public void afterField(Types.NestedField field)
afterField
in class TypeUtil.SchemaVisitor<java.util.Map<java.lang.String,java.lang.Integer>>
public void beforeListElement(Types.NestedField elementField)
beforeListElement
in class TypeUtil.SchemaVisitor<java.util.Map<java.lang.String,java.lang.Integer>>
public void afterListElement(Types.NestedField elementField)
afterListElement
in class TypeUtil.SchemaVisitor<java.util.Map<java.lang.String,java.lang.Integer>>
public void beforeMapKey(Types.NestedField keyField)
beforeMapKey
in class TypeUtil.SchemaVisitor<java.util.Map<java.lang.String,java.lang.Integer>>
public void afterMapKey(Types.NestedField keyField)
afterMapKey
in class TypeUtil.SchemaVisitor<java.util.Map<java.lang.String,java.lang.Integer>>
public void beforeMapValue(Types.NestedField valueField)
beforeMapValue
in class TypeUtil.SchemaVisitor<java.util.Map<java.lang.String,java.lang.Integer>>
public void afterMapValue(Types.NestedField valueField)
afterMapValue
in class TypeUtil.SchemaVisitor<java.util.Map<java.lang.String,java.lang.Integer>>
public java.util.Map<java.lang.String,java.lang.Integer> schema(Schema schema, java.util.Map<java.lang.String,java.lang.Integer> structResult)
schema
in class TypeUtil.SchemaVisitor<java.util.Map<java.lang.String,java.lang.Integer>>
public java.util.Map<java.lang.String,java.lang.Integer> struct(Types.StructType struct, java.util.List<java.util.Map<java.lang.String,java.lang.Integer>> fieldResults)
struct
in class TypeUtil.SchemaVisitor<java.util.Map<java.lang.String,java.lang.Integer>>
public java.util.Map<java.lang.String,java.lang.Integer> field(Types.NestedField field, java.util.Map<java.lang.String,java.lang.Integer> fieldResult)
field
in class TypeUtil.SchemaVisitor<java.util.Map<java.lang.String,java.lang.Integer>>
public java.util.Map<java.lang.String,java.lang.Integer> list(Types.ListType list, java.util.Map<java.lang.String,java.lang.Integer> elementResult)
list
in class TypeUtil.SchemaVisitor<java.util.Map<java.lang.String,java.lang.Integer>>
public java.util.Map<java.lang.String,java.lang.Integer> map(Types.MapType map, java.util.Map<java.lang.String,java.lang.Integer> keyResult, java.util.Map<java.lang.String,java.lang.Integer> valueResult)
map
in class TypeUtil.SchemaVisitor<java.util.Map<java.lang.String,java.lang.Integer>>
public java.util.Map<java.lang.String,java.lang.Integer> primitive(Type.PrimitiveType primitive)
primitive
in class TypeUtil.SchemaVisitor<java.util.Map<java.lang.String,java.lang.Integer>>