Package org.apache.iceberg.mapping
Class MappingUtil
java.lang.Object
org.apache.iceberg.mapping.MappingUtil
- 
Method SummaryModifier and TypeMethodDescriptionstatic NameMappingCreate a name-based mapping for a schema.static NameMappingupdate(NameMapping mapping, Map<Integer, Types.NestedField> updates, org.apache.iceberg.relocated.com.google.common.collect.Multimap<Integer, Integer> adds) Update a name-based mapping using changes to a schema.
- 
Method Details- 
createCreate a name-based mapping for a schema.The mapping returned by this method will use the schema's name for each field. - Parameters:
- schema- a- Schema
- Returns:
- a NameMappinginitialized with the schema's fields and names
 
- 
updatepublic static NameMapping update(NameMapping mapping, Map<Integer, Types.NestedField> updates, org.apache.iceberg.relocated.com.google.common.collect.Multimap<Integer, Integer> adds) Update a name-based mapping using changes to a schema.- Parameters:
- mapping- a name-based mapping
- updates- a map from field ID to updated field definitions
- adds- a map from parent field ID to nested fields to be added
- Returns:
- an updated mapping with names added to renamed fields and the mapping extended for new fields
 
 
-