@InterfaceAudience.Public @InterfaceStability.Stable public class HCatFieldSchema extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
HCatFieldSchema.Category |
static class |
HCatFieldSchema.Type |
Constructor and Description |
---|
HCatFieldSchema(String fieldName,
HCatFieldSchema.Type type,
HCatFieldSchema.Type mapKeyType,
HCatSchema mapValueSchema,
String comment)
Deprecated.
as of 0.13, slated for removal with 0.15
use
createMapTypeFieldSchema(String, org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo, HCatSchema, String) |
HCatFieldSchema(String fieldName,
HCatFieldSchema.Type type,
HCatSchema subSchema,
String comment)
Constructor for constructing a ARRAY type or STRUCT type HCatFieldSchema, passing type and subschema
|
HCatFieldSchema(String fieldName,
HCatFieldSchema.Type type,
String comment)
Deprecated.
as of 0.13, slated for removal with 0.15
use
HCatFieldSchema(String, org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo, String) |
HCatFieldSchema(String fieldName,
PrimitiveTypeInfo typeInfo,
String comment) |
Modifier and Type | Method and Description |
---|---|
static HCatFieldSchema |
createMapTypeFieldSchema(String fieldName,
PrimitiveTypeInfo mapKeyType,
HCatSchema mapValueSchema,
String comment) |
boolean |
equals(Object obj) |
HCatSchema |
getArrayElementSchema() |
HCatFieldSchema.Category |
getCategory()
Returns category of the field
|
String |
getComment() |
HCatFieldSchema.Type |
getMapKeyType()
Deprecated.
as of 0.13, slated for removal with 0.15
use
getMapKeyTypeInfo() instead |
PrimitiveTypeInfo |
getMapKeyTypeInfo() |
HCatSchema |
getMapValueSchema() |
String |
getName()
Returns name of the field
|
HCatSchema |
getStructSubSchema() |
HCatFieldSchema.Type |
getType()
Deprecated.
as of 0.13, slated for removal with 0.15
use
getTypeInfo() instead |
PrimitiveTypeInfo |
getTypeInfo()
May return
null |
String |
getTypeString() |
int |
hashCode() |
boolean |
isComplex() |
String |
toString() |
public HCatFieldSchema(String fieldName, HCatFieldSchema.Type type, String comment) throws HCatException
HCatFieldSchema(String, org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo, String)
fieldName
- Name of the primitive fieldtype
- Type of the primitive fieldHCatException
- if call made on non-primitive typespublic HCatFieldSchema(String fieldName, PrimitiveTypeInfo typeInfo, String comment) throws HCatException
HCatException
public HCatFieldSchema(String fieldName, HCatFieldSchema.Type type, HCatSchema subSchema, String comment) throws HCatException
fieldName
- Name of the array or struct fieldtype
- Type of the field - either Type.ARRAY or Type.STRUCTsubSchema
- - subschema of the struct, or element schema of the elements in the arrayHCatException
- if call made on Primitive or Map typespublic HCatFieldSchema(String fieldName, HCatFieldSchema.Type type, HCatFieldSchema.Type mapKeyType, HCatSchema mapValueSchema, String comment) throws HCatException
createMapTypeFieldSchema(String, org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo, HCatSchema, String)
fieldName
- Name of the array or struct fieldtype
- Type of the field - must be Type.MAPmapKeyType
- - key type of the MapmapValueSchema
- - subschema of the value of the MapHCatException
- if call made on non-Map typespublic boolean isComplex()
public HCatFieldSchema.Type getType()
getTypeInfo()
insteadpublic HCatFieldSchema.Category getCategory()
public String getName()
public String getComment()
public PrimitiveTypeInfo getTypeInfo()
null
public static HCatFieldSchema createMapTypeFieldSchema(String fieldName, PrimitiveTypeInfo mapKeyType, HCatSchema mapValueSchema, String comment) throws HCatException
HCatException
public HCatSchema getStructSubSchema() throws HCatException
HCatException
public HCatSchema getArrayElementSchema() throws HCatException
HCatException
public HCatFieldSchema.Type getMapKeyType() throws HCatException
getMapKeyTypeInfo()
insteadHCatException
public PrimitiveTypeInfo getMapKeyTypeInfo() throws HCatException
HCatException
public HCatSchema getMapValueSchema() throws HCatException
HCatException
public String getTypeString()
Copyright © 2019 The Apache Software Foundation. All rights reserved.