Class VariantColumnMetadata
java.lang.Object
org.apache.drill.exec.record.metadata.AbstractPropertied
org.apache.drill.exec.record.metadata.AbstractColumnMetadata
org.apache.drill.exec.record.metadata.VariantColumnMetadata
- All Implemented Interfaces:
ColumnMetadata
,Propertied
-
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
ConstructorDescriptionVariantColumnMetadata
(MaterializedField schema, VariantSchema variantSchema) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Create an empty version of this column.copy()
boolean
isArray()
boolean
Report whether one column is equivalent to another.boolean
static VariantColumnMetadata
static VariantColumnMetadata
listOf
(String name, VariantSchema variantSchema) schema()
Converts type metadata into string representation accepted by the table schema parser.static VariantColumnMetadata
static VariantColumnMetadata
unionOf
(String name, VariantSchema variantSchema) static VariantColumnMetadata
unionOf
(MaterializedField schema, VariantSchema variantSchema) static VariantColumnMetadata
variantOf
(String name, TypeProtos.MinorType type, VariantSchema variantSchema) Schema forVARIANT
columns.Methods inherited from class org.apache.drill.exec.record.metadata.AbstractColumnMetadata
bind, childSchema, columnString, createColumnMetadata, dateTimeFormatter, decodeDefaultValue, defaultValue, dimensions, equals, equalsWithProperties, equalsWithProperties, escapeSpecialSymbols, expectedElementCount, expectedWidth, format, isDict, isDynamic, isMap, isMultiList, isNullable, isScalar, isVariableWidth, majorType, mode, name, precision, properties, scale, setDefaultValue, setExpectedElementCount, setExpectedWidth, setFormat, toString, tupleSchema, type, valueFromString, valueToString
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.Propertied
booleanProperty, booleanProperty, hasProperties, intProperty, intProperty, property, property, removeProperty, setBooleanProperty, setIntProperty, setProperties, setProperty
-
Constructor Details
-
VariantColumnMetadata
-
VariantColumnMetadata
-
-
Method Details
-
union
-
unionOf
-
unionOf
-
list
-
listOf
-
variantOf
public static VariantColumnMetadata variantOf(String name, TypeProtos.MinorType type, VariantSchema variantSchema) -
structureType
-
isVariant
public boolean isVariant()- Specified by:
isVariant
in interfaceColumnMetadata
- Overrides:
isVariant
in classAbstractColumnMetadata
-
isArray
public boolean isArray()- Specified by:
isArray
in interfaceColumnMetadata
- Overrides:
isArray
in classAbstractColumnMetadata
-
cloneEmpty
Description copied from interface:ColumnMetadata
Create 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
-
variantSchema
Description copied from interface:ColumnMetadata
Schema forVARIANT
columns.- Specified by:
variantSchema
in interfaceColumnMetadata
- Overrides:
variantSchema
in classAbstractColumnMetadata
- Returns:
- the variant schema
-
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
-
schema
-
emptySchema
-
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
-