Class DynamicColumn
java.lang.Object
org.apache.drill.exec.record.metadata.AbstractPropertied
org.apache.drill.exec.record.metadata.AbstractColumnMetadata
org.apache.drill.exec.record.metadata.DynamicColumn
- All Implemented Interfaces:
ColumnMetadata,Propertied
- Direct Known Subclasses:
ProjectedColumn
A dynamic column has a name but not a type. The column may be
a map, array or scalar: we don't yet know. A dynamic column is
the equivalent of an item in a name-only project list. This type
can also represent a wildcard. A dynamic column is not a concrete
data description: it must be resolved to an actual type before
it can be used to create vectors, readers, writers, etc. The
dynamic column allows the tuple metadata to be used to represent
all phases of a schema lifecycle, including Drill's "dynamic"
schema before a reader resolves the column to some actual
type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.drill.exec.record.metadata.ColumnMetadata
ColumnMetadata.StructureType -
Field Summary
FieldsFields inherited from class org.apache.drill.exec.record.metadata.AbstractColumnMetadata
mode, name, precision, scale, typeFields 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_SUFFIXFields inherited from interface org.apache.drill.exec.record.metadata.Propertied
DRILL_PROP_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate an empty version of this column.Converts column metadata into string representation accepted by the table schema parser.copy()booleanReports if the column is dynamic.booleanReport whether one column is equivalent to another.schema()Converts type metadata into string representation accepted by the table schema parser.Methods inherited from class org.apache.drill.exec.record.metadata.AbstractColumnMetadata
appendContents, bind, childSchema, createColumnMetadata, dateTimeFormatter, decodeDefaultValue, defaultValue, dimensions, equals, equalsWithProperties, equalsWithProperties, escapeSpecialSymbols, expectedElementCount, expectedWidth, format, isArray, isDict, isMap, isMultiList, isNullable, isScalar, isVariableWidth, isVariant, majorType, mode, name, precision, properties, scale, setDefaultValue, setExpectedElementCount, setExpectedWidth, setFormat, toString, tupleSchema, type, valueFromString, valueToString, variantSchemaMethods inherited from class org.apache.drill.exec.record.metadata.AbstractPropertied
booleanProperty, booleanProperty, hashCode, hasProperties, intProperty, intProperty, property, property, removeProperty, setBooleanProperty, setIntProperty, setProperties, setPropertyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.drill.exec.record.metadata.Propertied
booleanProperty, booleanProperty, hasProperties, intProperty, intProperty, property, property, removeProperty, setBooleanProperty, setIntProperty, setProperties, setProperty
-
Field Details
-
WILDCARD
- See Also:
-
WILDCARD_COLUMN
-
-
Constructor Details
-
DynamicColumn
-
-
Method Details
-
structureType
-
isDynamic
public boolean isDynamic()Description copied from interface:ColumnMetadataReports if the column is dynamic. A dynamic column is one with a "type to be named later." It is valid for describing a dynamic schema, but not for creating vectors; to create a vector the column must be resolved to a concrete type. The context should make it clear if any columns can be dynamic.- Specified by:
isDynamicin interfaceColumnMetadata- Overrides:
isDynamicin classAbstractColumnMetadata- Returns:
trueif the column does not yet have a concrete type,falseif the column type is concrete
-
schema
-
emptySchema
-
cloneEmpty
Description copied from interface:ColumnMetadataCreate an empty version of this column. If the column is a scalar, produces a simple copy. If a map, produces a clone without child columns.- Returns:
- empty clone of this column
-
copy
-
isEquivalent
Description copied from interface:ColumnMetadataReport 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:
isEquivalentin interfaceColumnMetadata- Overrides:
isEquivalentin classAbstractColumnMetadata
-
columnString
Description copied from interface:ColumnMetadataConverts column metadata into string representation accepted by the table schema parser.- Specified by:
columnStringin interfaceColumnMetadata- Overrides:
columnStringin classAbstractColumnMetadata- Returns:
- column metadata string representation
-
typeString
Description copied from interface:ColumnMetadataConverts type metadata into string representation accepted by the table schema parser.- Specified by:
typeStringin interfaceColumnMetadata- Specified by:
typeStringin classAbstractColumnMetadata- Returns:
- type metadata string representation
-