Package org.apache.iceberg.types
Class IndexByName
java.lang.Object
org.apache.iceberg.types.TypeUtil.SchemaVisitor<Map<String,Integer>>
org.apache.iceberg.types.IndexByName
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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) byId()
Returns a mapping from field ID to full name.byName()
Returns a mapping from full field name to ID.field
(Types.NestedField field, Map<String, Integer> fieldResult) list
(Types.ListType list, Map<String, Integer> elementResult) primitive
(Type.PrimitiveType primitive)
-
Constructor Details
-
IndexByName
public IndexByName() -
IndexByName
-
-
Method Details
-
byName
Returns a mapping from full field name to ID.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'.
- Returns:
- a map from name to field ID
-
byId
Returns a mapping from field ID to full name.Canonical names, not short names are returned, for example 'list.element.field' instead of 'list.field'.
- Returns:
- a map from field ID to name
-
beforeField
- Overrides:
beforeField
in classTypeUtil.SchemaVisitor<Map<String,
Integer>>
-
afterField
- Overrides:
afterField
in classTypeUtil.SchemaVisitor<Map<String,
Integer>>
-
beforeListElement
- Overrides:
beforeListElement
in classTypeUtil.SchemaVisitor<Map<String,
Integer>>
-
afterListElement
- Overrides:
afterListElement
in classTypeUtil.SchemaVisitor<Map<String,
Integer>>
-
beforeMapKey
- Overrides:
beforeMapKey
in classTypeUtil.SchemaVisitor<Map<String,
Integer>>
-
afterMapKey
- Overrides:
afterMapKey
in classTypeUtil.SchemaVisitor<Map<String,
Integer>>
-
beforeMapValue
- Overrides:
beforeMapValue
in classTypeUtil.SchemaVisitor<Map<String,
Integer>>
-
afterMapValue
- Overrides:
afterMapValue
in classTypeUtil.SchemaVisitor<Map<String,
Integer>>
-
schema
- Overrides:
schema
in classTypeUtil.SchemaVisitor<Map<String,
Integer>>
-
struct
- Overrides:
struct
in classTypeUtil.SchemaVisitor<Map<String,
Integer>>
-
field
- Overrides:
field
in classTypeUtil.SchemaVisitor<Map<String,
Integer>>
-
list
- Overrides:
list
in classTypeUtil.SchemaVisitor<Map<String,
Integer>>
-
map
public Map<String,Integer> map(Types.MapType map, Map<String, Integer> keyResult, Map<String, Integer> valueResult) - Overrides:
map
in classTypeUtil.SchemaVisitor<Map<String,
Integer>>
-
primitive
- Overrides:
primitive
in classTypeUtil.SchemaVisitor<Map<String,
Integer>>
-