public class SchemaEvolutionUtil extends Object
| Constructor and Description |
|---|
SchemaEvolutionUtil() |
| Modifier and Type | Method and Description |
|---|---|
static IndexCastMapping |
createIndexCastMapping(List<DataField> tableFields,
List<DataField> dataFields)
Create index mapping from table fields to underlying data fields.
|
static int[] |
createIndexMapping(List<DataField> tableFields,
List<DataField> dataFields)
Create index mapping from table fields to underlying data fields.
|
static List<Predicate> |
devolveDataFilters(List<DataField> tableFields,
List<DataField> dataFields,
List<Predicate> filters)
When pushing down filters after schema evolution, we should devolve the literals from new
types (in dataFields) to original types (in tableFields).
|
@Nullable public static int[] createIndexMapping(List<DataField> tableFields, List<DataField> dataFields)
We can get the index mapping [0, -1, 1], in which 0 is the index of table field 1->c in data fields, -1 is the index of 6->b in data fields and 1 is the index of 3->a in data fields.
tableFields - the fields of tabledataFields - the fields of underlying datapublic static IndexCastMapping createIndexCastMapping(List<DataField> tableFields, List<DataField> dataFields)
@Nullable public static List<Predicate> devolveDataFilters(List<DataField> tableFields, List<DataField> dataFields, List<Predicate> filters)
tableFields - the table fieldsdataFields - the underlying data fieldsfilters - the filtersCopyright © 2023–2025 The Apache Software Foundation. All rights reserved.