Package org.apache.pinot.spi.data
Class ComplexFieldSpec
- java.lang.Object
-
- org.apache.pinot.spi.data.FieldSpec
-
- org.apache.pinot.spi.data.ComplexFieldSpec
-
- All Implemented Interfaces:
Serializable,Comparable<FieldSpec>
public final class ComplexFieldSpec extends FieldSpec
FieldSpec for complex fields. TheFieldSpec.FieldTypeis COMPLEX and the inner data type represents the root data type of the field. It could be STRUCT, MAP or LIST. A complex field is composable with a single root type and a number of child types. Although we have multi-value primitive columns, LIST is for representing lists of both complex and primitives inside a complex field. Consider a person json where the root type is STRUCT and composes of inner members: STRUCT( name: STRING age: INT salary: INT addresses: LIST (STRUCT apt: INT street: STRING city: STRING zip: INT ) ) The fieldspec would be COMPLEX with type as STRUCT and 4 inner members to model the hierarchy- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.pinot.spi.data.FieldSpec
FieldSpec.DataType, FieldSpec.FieldType
-
-
Field Summary
-
Fields inherited from class org.apache.pinot.spi.data.FieldSpec
_dataType, _defaultNullValue, _isSingleValueField, _name, _transformFunction, _virtualColumnProvider, DEFAULT_DIMENSION_NULL_VALUE_OF_BIG_DECIMAL, DEFAULT_DIMENSION_NULL_VALUE_OF_BOOLEAN, DEFAULT_DIMENSION_NULL_VALUE_OF_BYTES, DEFAULT_DIMENSION_NULL_VALUE_OF_DOUBLE, DEFAULT_DIMENSION_NULL_VALUE_OF_FLOAT, DEFAULT_DIMENSION_NULL_VALUE_OF_INT, DEFAULT_DIMENSION_NULL_VALUE_OF_JSON, DEFAULT_DIMENSION_NULL_VALUE_OF_LONG, DEFAULT_DIMENSION_NULL_VALUE_OF_STRING, DEFAULT_DIMENSION_NULL_VALUE_OF_TIMESTAMP, DEFAULT_MAX_LENGTH, DEFAULT_METRIC_NULL_VALUE_OF_BIG_DECIMAL, DEFAULT_METRIC_NULL_VALUE_OF_BYTES, DEFAULT_METRIC_NULL_VALUE_OF_DOUBLE, DEFAULT_METRIC_NULL_VALUE_OF_FLOAT, DEFAULT_METRIC_NULL_VALUE_OF_INT, DEFAULT_METRIC_NULL_VALUE_OF_LONG, DEFAULT_METRIC_NULL_VALUE_OF_STRING
-
-
Constructor Summary
Constructors Constructor Description ComplexFieldSpec()ComplexFieldSpec(String name, FieldSpec.DataType dataType, boolean isSingleValueField)
-
Method Summary
Modifier and Type Method Description voidaddChildFieldSpec(String child, FieldSpec fieldSpec)FieldSpecgetChildFieldSpec(String child)Map<String,FieldSpec>getChildFieldSpecs()FieldSpec.FieldTypegetFieldType()StringtoString()-
Methods inherited from class org.apache.pinot.spi.data.FieldSpec
appendDefaultNullValue, appendTransformFunction, compareTo, equals, getDataType, getDefaultNullValue, getDefaultNullValue, getDefaultNullValueString, getMaxLength, getName, getStringValue, getTransformFunction, getVirtualColumnProvider, hashCode, isBackwardCompatibleWith, isSingleValueField, isVirtualColumn, setDataType, setDefaultNullValue, setMaxLength, setName, setSingleValueField, setTransformFunction, setVirtualColumnProvider, toJsonObject
-
-
-
-
Constructor Detail
-
ComplexFieldSpec
public ComplexFieldSpec()
-
ComplexFieldSpec
public ComplexFieldSpec(@Nonnull String name, FieldSpec.DataType dataType, boolean isSingleValueField)
-
-
Method Detail
-
getFieldType
@Nonnull public FieldSpec.FieldType getFieldType()
- Specified by:
getFieldTypein classFieldSpec
-
-