Package org.apache.druid.data.input.impl
Class DimensionSchema
java.lang.Object
org.apache.druid.data.input.impl.DimensionSchema
- Direct Known Subclasses:
AutoTypeColumnSchema,DoubleDimensionSchema,FloatDimensionSchema,LongDimensionSchema,NestedDataColumnSchema,NewSpatialDimensionSchema,StringDimensionSchema
Defines the schema of a single dimension in a dataset.
Includes metadata such as the dimension's name, type, and whether it
can hold multiple values. Supports Jackson serialization/deserialization,
including polymorphic types via @JsonSubTypes.
Example JSON:
{
"type": "string",
"name": "country",
"multiValue": false
}
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDimensionSchema(String name, DimensionSchema.MultiValueHandling multiValueHandling, boolean createBitmapIndex) -
Method Summary
Modifier and TypeMethodDescriptionbooleanabstract ColumnTypestatic DimensionSchemagetDefaultSchemaForBuiltInType(String name, TypeSignature<ValueType> type) getEffectiveSchema(IndexSpec indexSpec) Computes the 'effective'DimensionSchema, allowing columns which provide mechanisms for customizing storage format to fill in values from the segment levelIndexSpecdefaults.getName()abstract StringbooleaninthashCode()toString()
-
Field Details
-
STRING_TYPE_NAME
- See Also:
-
LONG_TYPE_NAME
- See Also:
-
FLOAT_TYPE_NAME
- See Also:
-
SPATIAL_TYPE_NAME
- See Also:
-
DOUBLE_TYPE_NAME
- See Also:
-
-
Constructor Details
-
DimensionSchema
protected DimensionSchema(String name, DimensionSchema.MultiValueHandling multiValueHandling, boolean createBitmapIndex)
-
-
Method Details
-
getDefaultSchemaForBuiltInType
public static DimensionSchema getDefaultSchemaForBuiltInType(String name, TypeSignature<ValueType> type) -
getName
-
getMultiValueHandling
-
hasBitmapIndex
public boolean hasBitmapIndex() -
getTypeName
-
getColumnType
-
getDimensionHandler
-
getEffectiveSchema
Computes the 'effective'DimensionSchema, allowing columns which provide mechanisms for customizing storage format to fill in values from the segment levelIndexSpecdefaults. This is useful for comparising the operator explicitly defined schema with the 'effective' schema that was written to the segments for things like comparing compaction state. -
equals
-
hashCode
public int hashCode() -
toString
-