public class InternalSchema extends Object implements Serializable
| Constructor and Description |
|---|
InternalSchema(List<Types.Field> columns) |
InternalSchema(long versionId,
int maxColumnId,
List<Types.Field> cols) |
InternalSchema(long versionId,
int maxColumnId,
Types.Field... cols) |
InternalSchema(long versionId,
List<Types.Field> cols) |
InternalSchema(Types.Field... columns) |
| Modifier and Type | Method and Description |
|---|---|
List<Types.Field> |
columns()
Returns a List of the
columns in this Schema. |
boolean |
equals(Object o) |
boolean |
findDuplicateCol(String colName)
Whether colName exists in current Schema.
|
Types.Field |
findField(int id)
Returns the sub-field identified by the field id.
|
Types.Field |
findField(String name)
Returns a sub-field by name as a
Types.Field. |
String |
findfullName(int id)
Returns the
Type of a sub-field identified by the field name. |
int |
findIdByName(String name) |
Type |
findType(int id)
Returns the
Type of a sub-field identified by the field id. |
Type |
findType(String name)
Returns the
Type of a sub-field identified by the field name. |
List<String> |
getAllColsFullName()
Get all columns full name.
|
Set<Integer> |
getAllIds()
Returns all field ids
|
static InternalSchema |
getEmptyInternalSchema() |
int |
getMaxColumnId()
Returns the max column id for this schema.
|
Types.RecordType |
getRecord() |
int |
hashCode() |
boolean |
isEmptySchema() |
long |
schemaId()
Returns the version ID for this schema.
|
void |
setMaxColumnId(int maxColumnId)
Set the version ID for this schema.
|
InternalSchema |
setSchemaId(long versionId)
Set the version ID for this schema.
|
String |
toString() |
public InternalSchema(List<Types.Field> columns)
public InternalSchema(Types.Field... columns)
public InternalSchema(long versionId,
List<Types.Field> cols)
public InternalSchema(long versionId,
int maxColumnId,
List<Types.Field> cols)
public InternalSchema(long versionId,
int maxColumnId,
Types.Field... cols)
public static InternalSchema getEmptyInternalSchema()
public boolean isEmptySchema()
public Types.RecordType getRecord()
public InternalSchema setSchemaId(long versionId)
public long schemaId()
public void setMaxColumnId(int maxColumnId)
public int getMaxColumnId()
public List<Types.Field> columns()
columns in this Schema.public String findfullName(int id)
Type of a sub-field identified by the field name.id - a field idpublic Type findType(String name)
Type of a sub-field identified by the field name.name - a field namepublic Type findType(int id)
Type of a sub-field identified by the field id.id - a field idpublic Types.Field findField(int id)
id - a field idpublic Types.Field findField(String name)
Types.Field.
The result may be a top-level or a nested field.name - a String namepublic boolean findDuplicateCol(String colName)
colName - a colNamepublic int findIdByName(String name)
Copyright © 2022 The Apache Software Foundation. All rights reserved.