public class HiveFieldTrait extends BaseTrait<HiveFieldTrait>
Modifier and Type | Class and Description |
---|---|
static class |
HiveFieldTrait.TypeKind
The special type kind.
|
Constructor and Description |
---|
HiveFieldTrait() |
Modifier and Type | Method and Description |
---|---|
static HiveFieldTrait |
get(PropertyDeclaration declaration)
Returns the
HiveFieldTrait for the target property declaration. |
String |
getColumnName()
Returns the explicit column name.
|
static String |
getColumnName(PropertyDeclaration property)
Returns the explicit/inferred column name.
|
int |
getDecimalPrecision()
Returns the explicit decimal precision.
|
int |
getDecimalScale()
Returns the explicit decimal scale.
|
static org.apache.hadoop.hive.serde2.typeinfo.TypeInfo |
getNaturalTypeInfo(PropertyDeclaration property)
Returns the natural type information for the property.
|
int |
getStringLength()
Returns the explicit char/varchar length.
|
static org.apache.hadoop.hive.serde2.typeinfo.TypeInfo |
getTypeInfo(PropertyDeclaration property)
Returns the type information for the property.
|
HiveFieldTrait.TypeKind |
getTypeKind()
Returns the type kind.
|
boolean |
isColumnPresent()
Returns whether this field is a table column or not.
|
void |
setCharTypeInfo(int length)
Sets the char type info.
|
void |
setColumnName(String name)
Sets the explicit column name.
|
void |
setColumnPresent(boolean present)
Sets whether this field is a table column or not.
|
void |
setDecimalTypeInfo(int precision,
int scale)
Sets the decimal type info.
|
void |
setStringTypeInfo()
Sets the string type info.
|
void |
setTimestampTypeInfo()
Sets the timestamp type info.
|
void |
setVarcharTypeInfo(int length)
Sets the varchar type info.
|
getOriginalAst, setOriginalAst
public boolean isColumnPresent()
true
if this field is a columnpublic void setColumnPresent(boolean present)
present
- true
to make this field be column, false
otherwisepublic String getColumnName()
public void setColumnName(String name)
name
- the explicit column namepublic static String getColumnName(PropertyDeclaration property)
property
- the target propertypublic HiveFieldTrait.TypeKind getTypeKind()
public int getDecimalPrecision()
public int getDecimalScale()
public int getStringLength()
public void setTimestampTypeInfo()
public void setStringTypeInfo()
public void setDecimalTypeInfo(int precision, int scale)
precision
- the precisionscale
- the scalepublic void setCharTypeInfo(int length)
length
- the character string lengthpublic void setVarcharTypeInfo(int length)
length
- the character string lengthpublic static org.apache.hadoop.hive.serde2.typeinfo.TypeInfo getTypeInfo(PropertyDeclaration property)
property
- the target propertypublic static org.apache.hadoop.hive.serde2.typeinfo.TypeInfo getNaturalTypeInfo(PropertyDeclaration property)
property
- the target propertypublic static HiveFieldTrait get(PropertyDeclaration declaration)
HiveFieldTrait
for the target property declaration.declaration
- the target declarationCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.