Class Types.BasePrimitiveBuilder<P,THIS extends Types.BasePrimitiveBuilder<P,THIS>>
- java.lang.Object
-
- org.apache.parquet.schema.Types.Builder<THIS,P>
-
- org.apache.parquet.schema.Types.BasePrimitiveBuilder<P,THIS>
-
- Direct Known Subclasses:
Types.BaseListBuilder.ElementBuilder,Types.BaseMapBuilder.KeyBuilder,Types.BaseMapBuilder.ValueBuilder,Types.PrimitiveBuilder
- Enclosing class:
- Types
public abstract static class Types.BasePrimitiveBuilder<P,THIS extends Types.BasePrimitiveBuilder<P,THIS>> extends Types.Builder<THIS,P>
-
-
Field Summary
-
Fields inherited from class org.apache.parquet.schema.Types.Builder
id, logicalTypeAnnotation, newLogicalTypeSet, parent, repetition, returnClass
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected PrimitiveTypebuild(String name)THIScolumnOrder(ColumnOrder columnOrder)Adds the column order for the primitive type.protected DecimalMetadatadecimalMetadata()THISlength(int length)Adds the length for a FIXED_LEN_BYTE_ARRAY.THISprecision(int precision)Deprecated.useTypes.Builder.as(LogicalTypeAnnotation)with the corresponding decimal type insteadTHISscale(int scale)Deprecated.useTypes.Builder.as(LogicalTypeAnnotation)with the corresponding decimal type insteadprotected abstract THISself()-
Methods inherited from class org.apache.parquet.schema.Types.Builder
as, as, getOriginalType, id, named, repetition
-
-
-
-
Method Detail
-
self
protected abstract THIS self()
- Specified by:
selfin classTypes.Builder<THIS extends Types.BasePrimitiveBuilder<P,THIS>,P>
-
length
public THIS length(int length)
Adds the length for a FIXED_LEN_BYTE_ARRAY.- Parameters:
length- an int length- Returns:
- this builder for method chaining
-
precision
@Deprecated public THIS precision(int precision)
Deprecated.useTypes.Builder.as(LogicalTypeAnnotation)with the corresponding decimal type insteadAdds the precision for a DECIMAL.This value is required for decimals and must be less than or equal to the maximum number of base-10 digits in the underlying type. A 4-byte fixed, for example, can store up to 9 base-10 digits.
- Parameters:
precision- an int precision value for the DECIMAL- Returns:
- this builder for method chaining
-
scale
@Deprecated public THIS scale(int scale)
Deprecated.useTypes.Builder.as(LogicalTypeAnnotation)with the corresponding decimal type insteadAdds the scale for a DECIMAL.This value must be less than the maximum precision of the type and must be a positive number. If not set, the default scale is 0.
The scale specifies the number of digits of the underlying unscaled that are to the right of the decimal point. The decimal interpretation of values in this column is:
value*10^(-scale).- Parameters:
scale- an int scale value for the DECIMAL- Returns:
- this builder for method chaining
-
columnOrder
public THIS columnOrder(ColumnOrder columnOrder)
Adds the column order for the primitive type.In case of not set the default column order is
ColumnOrder.ColumnOrderName.TYPE_DEFINED_ORDERexcept the typePrimitiveType.PrimitiveTypeName.INT96and the types annotated byOriginalType.INTERVALwhere the default column order isColumnOrder.ColumnOrderName.UNDEFINED.- Parameters:
columnOrder- the column order for the primitive type- Returns:
- this builder for method chaining
-
build
protected PrimitiveType build(String name)
- Specified by:
buildin classTypes.Builder<THIS extends Types.BasePrimitiveBuilder<P,THIS>,P>
-
decimalMetadata
protected DecimalMetadata decimalMetadata()
-
-