public class TypeDescription extends Object implements Comparable<TypeDescription>, Serializable
Modifier and Type | Class and Description |
---|---|
static class |
TypeDescription.Category |
public int compareTo(TypeDescription other)
compareTo
in interface Comparable<TypeDescription>
public static TypeDescription createBoolean()
public static TypeDescription createByte()
public static TypeDescription createShort()
public static TypeDescription createInt()
public static TypeDescription createLong()
public static TypeDescription createFloat()
public static TypeDescription createDouble()
public static TypeDescription createString()
public static TypeDescription createDate()
public static TypeDescription createTimestamp()
public static TypeDescription createBinary()
public static TypeDescription createDecimal()
public TypeDescription withPrecision(int precision)
precision
- the new precisionpublic TypeDescription withScale(int scale)
scale
- the new scalepublic static TypeDescription createVarchar()
public static TypeDescription createChar()
public TypeDescription withMaxLength(int maxLength)
maxLength
- the maximum valuepublic static TypeDescription createList(TypeDescription childType)
public static TypeDescription createMap(TypeDescription keyType, TypeDescription valueType)
public static TypeDescription createUnion()
public static TypeDescription createStruct()
public TypeDescription addUnionChild(TypeDescription child)
child
- a new child type to addpublic TypeDescription addField(String field, TypeDescription fieldType)
field
- the field namefieldType
- the type of the fieldpublic int getId()
public TypeDescription clone()
public int getMaximumId()
public VectorizedRowBatch createRowBatch(int maxSize)
public VectorizedRowBatch createRowBatch()
public TypeDescription.Category getCategory()
public int getMaxLength()
public int getPrecision()
public int getScale()
public List<String> getFieldNames()
public List<TypeDescription> getChildren()
public void printToBuffer(StringBuilder buffer)
public String toJson()
Copyright © 2016 The Apache Software Foundation. All rights reserved.