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. Columns have multiple types represented via the type field.
-
-
Constructor Summary
Constructors Constructor Description ColumnSpec(String name, String sqlType, Map<String,Object> properties)ColumnSpec(ColumnSpec from)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()StringsqlType()StringtoString()voidvalidate()
-
-
-
Method Detail
-
name
public String name()
-
sqlType
public String sqlType()
-
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).
-
-