public class PrimitiveColumnMetadata extends AbstractColumnMetadata
Metadata is of two types:
ColumnMetadata.StructureTypemode, name, precision, scale, typeBLANK_AS_NULL, BLANK_AS_PROP, BLANK_AS_ZERO, DEFAULT_ARRAY_SIZE, DEFAULT_VALUE_PROP, EXCLUDE_FROM_WILDCARD, EXPECTED_CARDINALITY_PROP, EXPECTED_WIDTH_PROP, FORMAT_PROP, IMPLICIT_COL_TYPE, IMPLICIT_FILENAME, IMPLICIT_FILEPATH, IMPLICIT_FQN, IMPLICIT_PARTITION_PREFIX, IMPLICIT_SUFFIXDRILL_PROP_PREFIX| Constructor and Description |
|---|
PrimitiveColumnMetadata(MaterializedField schema) |
PrimitiveColumnMetadata(PrimitiveColumnMetadata from) |
PrimitiveColumnMetadata(String name,
TypeProtos.MajorType type) |
PrimitiveColumnMetadata(String name,
TypeProtos.MinorType type,
TypeProtos.DataMode mode) |
| Modifier and Type | Method and Description |
|---|---|
ColumnMetadata |
cloneEmpty()
Create an empty version of this column.
|
ColumnMetadata |
copy() |
DateTimeFormatter |
dateTimeFormatter()
Returns the formatter to use for date/time values.
|
MaterializedField |
emptySchema() |
int |
expectedWidth()
Get the expected width for a column.
|
boolean |
isEquivalent(ColumnMetadata o)
Report whether one column is equivalent to another.
|
TypeProtos.MajorType |
majorType() |
ColumnMetadata |
mergeWith(MaterializedField field) |
int |
precision()
Returns precision for current column.
|
int |
scale()
Returns scale for current column.
|
MaterializedField |
schema() |
void |
setExpectedWidth(int width)
For variable-width columns, specify the expected column width to be used
when allocating a new vector.
|
ColumnMetadata.StructureType |
structureType() |
String |
typeString()
Converts type metadata into string representation
accepted by the table schema parser.
|
Object |
valueFromString(String value)
Converts value in string literal form into Object instance based on
TypeProtos.MinorType value. |
String |
valueToString(Object value)
Converts given value instance into String literal representation based on
column metadata type.
|
appendContents, bind, childSchema, columnString, createColumnMetadata, decodeDefaultValue, defaultValue, dimensions, equals, equalsWithProperties, equalsWithProperties, escapeSpecialSymbols, expectedElementCount, format, isArray, isDict, isDynamic, isMap, isMultiList, isNullable, isVariableWidth, isVariant, mode, name, properties, setDefaultValue, setExpectedElementCount, setFormat, toString, tupleSchema, type, variantSchemabooleanProperty, booleanProperty, hashCode, hasProperties, intProperty, intProperty, property, property, removeProperty, setBooleanProperty, setIntProperty, setProperties, setPropertyclone, finalize, getClass, notify, notifyAll, wait, wait, waitbooleanProperty, booleanProperty, hasProperties, intProperty, intProperty, pluginPrefix, property, property, removeProperty, setBooleanProperty, setIntProperty, setProperties, setPropertypublic PrimitiveColumnMetadata(MaterializedField schema)
public PrimitiveColumnMetadata(String name, TypeProtos.MajorType type)
public PrimitiveColumnMetadata(String name, TypeProtos.MinorType type, TypeProtos.DataMode mode)
public PrimitiveColumnMetadata(PrimitiveColumnMetadata from)
public ColumnMetadata copy()
public ColumnMetadata.StructureType structureType()
public int expectedWidth()
ColumnMetadataexpectedWidth in interface ColumnMetadataexpectedWidth in class AbstractColumnMetadatapublic int precision()
AbstractColumnMetadataprecision in interface ColumnMetadataprecision in class AbstractColumnMetadatapublic int scale()
AbstractColumnMetadatascale in interface ColumnMetadatascale in class AbstractColumnMetadatapublic void setExpectedWidth(int width)
ColumnMetadatasetExpectedWidth in interface ColumnMetadatasetExpectedWidth in class AbstractColumnMetadatawidth - the expected column widthpublic DateTimeFormatter dateTimeFormatter()
ColumnMetadatadateTimeFormatter in interface ColumnMetadatadateTimeFormatter in class AbstractColumnMetadatapublic ColumnMetadata cloneEmpty()
ColumnMetadatapublic ColumnMetadata mergeWith(MaterializedField field)
public TypeProtos.MajorType majorType()
majorType in interface ColumnMetadatamajorType in class AbstractColumnMetadatapublic MaterializedField schema()
public MaterializedField emptySchema()
public String typeString()
ColumnMetadatatypeString in interface ColumnMetadatatypeString in class AbstractColumnMetadatapublic Object valueFromString(String value)
TypeProtos.MinorType value.
Returns null in case of error during parsing or unsupported type.valueFromString in interface ColumnMetadatavalueFromString in class AbstractColumnMetadatavalue - value in string literal formpublic String valueToString(Object value)
valueToString in interface ColumnMetadatavalueToString in class AbstractColumnMetadatavalue - value instancepublic boolean isEquivalent(ColumnMetadata o)
ColumnMetadataisEquivalent in interface ColumnMetadataisEquivalent in class AbstractColumnMetadataCopyright © 2021 The Apache Software Foundation. All rights reserved.