Class AbstractMapColumnMetadata
java.lang.Object
org.apache.drill.exec.record.metadata.AbstractPropertied
org.apache.drill.exec.record.metadata.AbstractColumnMetadata
org.apache.drill.exec.record.metadata.AbstractMapColumnMetadata
- All Implemented Interfaces:
ColumnMetadata
,Propertied
- Direct Known Subclasses:
DictColumnMetadata
,MapColumnMetadata
Describes a base column type for map, dict, repeated map and repeated dict. All are tuples that have a tuple
schema as part of the column definition.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.drill.exec.record.metadata.ColumnMetadata
ColumnMetadata.StructureType
-
Field Summary
Fields inherited from class org.apache.drill.exec.record.metadata.AbstractColumnMetadata
mode, name, precision, scale, type
Fields inherited from interface org.apache.drill.exec.record.metadata.ColumnMetadata
BLANK_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_SUFFIX
Fields inherited from interface org.apache.drill.exec.record.metadata.Propertied
DRILL_PROP_PREFIX
-
Constructor Summary
ConstructorDescriptionAbstractMapColumnMetadata
(String name, TypeProtos.MinorType type, TypeProtos.DataMode mode, TupleSchema schema) Build a new map column from the field provided -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
bind
(TupleMetadata parentTuple) int
Get the expected width for a column.protected abstract String
Returns specific type string representation of the type that extends this class.boolean
Report whether one column is equivalent to another.schema()
Schema forTUPLE
columns.Converts type metadata into string representation accepted by the table schema parser.Methods inherited from class org.apache.drill.exec.record.metadata.AbstractColumnMetadata
childSchema, columnString, createColumnMetadata, dateTimeFormatter, decodeDefaultValue, defaultValue, dimensions, equals, equalsWithProperties, equalsWithProperties, escapeSpecialSymbols, expectedElementCount, format, isArray, isDict, isDynamic, isMap, isMultiList, isNullable, isScalar, isVariableWidth, isVariant, majorType, mode, name, precision, properties, scale, setDefaultValue, setExpectedElementCount, setExpectedWidth, setFormat, toString, type, valueFromString, valueToString, variantSchema
Methods inherited from class org.apache.drill.exec.record.metadata.AbstractPropertied
booleanProperty, booleanProperty, hashCode, hasProperties, intProperty, intProperty, property, property, removeProperty, setBooleanProperty, setIntProperty, setProperties, setProperty
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.drill.exec.record.metadata.ColumnMetadata
cloneEmpty, copy
Methods inherited from interface org.apache.drill.exec.record.metadata.Propertied
booleanProperty, booleanProperty, hasProperties, intProperty, intProperty, property, property, removeProperty, setBooleanProperty, setIntProperty, setProperties, setProperty
-
Field Details
-
parentTuple
-
schema
-
-
Constructor Details
-
AbstractMapColumnMetadata
Build a new map column from the field provided- Parameters:
schema
- materialized field description of the map
-
AbstractMapColumnMetadata
-
AbstractMapColumnMetadata
public AbstractMapColumnMetadata(String name, TypeProtos.MinorType type, TypeProtos.DataMode mode, TupleSchema schema)
-
-
Method Details
-
bind
- Specified by:
bind
in interfaceColumnMetadata
- Overrides:
bind
in classAbstractColumnMetadata
-
structureType
-
tupleSchema
Description copied from interface:ColumnMetadata
Schema forTUPLE
columns.- Specified by:
tupleSchema
in interfaceColumnMetadata
- Overrides:
tupleSchema
in classAbstractColumnMetadata
- Returns:
- the tuple schema
-
expectedWidth
public int expectedWidth()Description copied from interface:ColumnMetadata
Get the expected width for a column. This is the actual width for fixed- width columns, the specified width (defaulting to 50) for variable-width columns.- Specified by:
expectedWidth
in interfaceColumnMetadata
- Overrides:
expectedWidth
in classAbstractColumnMetadata
- Returns:
- the expected column width of the each data value. Does not include "overhead" space such as for the null-value vector or offset vector
-
parentTuple
-
schema
-
emptySchema
-
typeString
Description copied from interface:ColumnMetadata
Converts type metadata into string representation accepted by the table schema parser.- Specified by:
typeString
in interfaceColumnMetadata
- Specified by:
typeString
in classAbstractColumnMetadata
- Returns:
- type metadata string representation
-
internalTypeString
Returns specific type string representation of the type that extends this class.- Returns:
- type string representation
-
appendContents
- Overrides:
appendContents
in classAbstractColumnMetadata
-
isEquivalent
Description copied from interface:ColumnMetadata
Report whether one column is equivalent to another. Columns are equivalent if they have the same name, type and structure (ignoring internal structure such as properties.)- Specified by:
isEquivalent
in interfaceColumnMetadata
- Overrides:
isEquivalent
in classAbstractColumnMetadata
-