Package org.apache.druid.catalog.model
Class ColumnSpec
- java.lang.Object
-
- org.apache.druid.catalog.model.ColumnSpec
-
public class ColumnSpec extends Object
Specification of table columns.
-
-
Constructor Summary
Constructors Constructor Description ColumnSpec(String name, String dataType, Map<String,Object> properties)ColumnSpec(ColumnSpec from)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdataType()booleanequals(Object o)inthashCode()ColumnSpecmerge(Map<String,ModelProperties.PropertyDefn<?>> columnProperties, ColumnSpec update)Merges an updated version of this column with an existing version.Stringname()Map<String,Object>properties()StringtoString()voidvalidate()
-
-
-
Method Detail
-
name
public String name()
-
dataType
public String dataType()
-
validate
public void validate()
-
merge
public ColumnSpec merge(Map<String,ModelProperties.PropertyDefn<?>> columnProperties, ColumnSpec update)
Merges an updated version of this column with an existing version.The name cannot be changed (it is what links the existing column and the update). The SQL type will be that provided in the update, if non-null, else the original type. Properties are merged using standard rules: those in the update take precedence. Null values in the update remove the existing property, non-null values update the property. Any properties in the update but not in the existing set, are inserted (if non-null).
-
-