@InterfaceAudience.User @InterfaceStability.Unstable public class Schema extends Object
| Constructor and Description |
|---|
Schema(Field[] fields)
construct a schema with fields
|
Schema(List<org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema> columnSchemaList)
construct a schema with List
|
| Modifier and Type | Method and Description |
|---|---|
Schema |
asOriginOrder()
Sort the schema order as original order
|
boolean |
equals(Object obj) |
String |
getArrayElementTypeName(int ordinal)
get array child element data type name by ordinal
|
String |
getFieldDataTypeName(int ordinal)
get field data type name by ordinal
|
String |
getFieldName(int ordinal)
get field name by ordinal
|
Field[] |
getFields() |
int |
getFieldsLength()
get fields length of schema
|
int |
hashCode() |
static Schema |
parseJson(String json)
Create a Schema using JSON string, for example:
[
{"name":"string"},
{"age":"int"}
]
|
public Schema(Field[] fields)
fields - public Schema(List<org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema> columnSchemaList)
columnSchemaList - column schema listpublic static Schema parseJson(String json)
json - specified as stringpublic Field[] getFields()
public int getFieldsLength()
public String getFieldName(int ordinal)
ordinal - the data index of carbon schemapublic String getFieldDataTypeName(int ordinal)
ordinal - the data index of carbon schemapublic String getArrayElementTypeName(int ordinal)
ordinal - the data index of carbon schemapublic Schema asOriginOrder()
Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.