public class InternalSchemaBuilder extends Object implements Serializable
| Modifier and Type | Method and Description |
|---|---|
Map<Integer,Types.Field> |
buildIdToField(Type type)
Build a mapping from id to field for a internal Type.
|
Map<Integer,String> |
buildIdToName(Type type)
Build a mapping from id to full field name for a internal Type.
|
Map<String,Integer> |
buildNameToId(Type type)
Build a mapping from full field name to id for a internal Type.
|
static InternalSchemaBuilder |
getBuilder() |
Map<Integer,Integer> |
index2Parents(Types.RecordType record)
Build a mapping which maintain the relation between child field id and it's parent field id.
|
Type |
refreshNewId(Type type,
AtomicInteger nextId)
Assigns new ids for all fields in a Type, based on initial id.
|
<T> T |
visit(InternalSchema schema,
InternalSchemaVisitor<T> visitor)
Use to traverse all types in internalSchema with visitor.
|
<T> T |
visit(Type type,
InternalSchemaVisitor<T> visitor) |
public static InternalSchemaBuilder getBuilder()
public Map<Integer,String> buildIdToName(Type type)
type - hoodie internal typepublic Map<String,Integer> buildNameToId(Type type)
type - hoodie internal typepublic <T> T visit(InternalSchema schema, InternalSchemaVisitor<T> visitor)
schema - hoodie internal schemapublic <T> T visit(Type type, InternalSchemaVisitor<T> visitor)
public Map<Integer,Types.Field> buildIdToField(Type type)
type - hoodie internal typepublic Map<Integer,Integer> index2Parents(Types.RecordType record)
record - hoodie record type.public Type refreshNewId(Type type, AtomicInteger nextId)
type - a type.nextId - initial id which used to fresh ids for all fields in a typeCopyright © 2024 The Apache Software Foundation. All rights reserved.