Class FileSchema.PrimitiveBuilder
java.lang.Object
dev.hardwood.schema.FileSchema.PrimitiveBuilder
- Enclosing class:
FileSchema
Sets the optional attributes of a primitive leaf: a column, a list element, a map key or
a map value. Each attribute can be set one time.
-
Method Summary
Modifier and TypeMethodDescriptionfieldId(int fieldId) Set the field id (field_idinparquet.thrift).logicalType(LogicalType logicalType) Set the logical type annotation.typeLength(int typeLength) Set the fixed byte length of aFIXED_LEN_BYTE_ARRAYleaf.
-
Method Details
-
logicalType
Set the logical type annotation. It must be legal for the leaf's physical type. A leaf whose lambda does not call this method is unannotated.- Throws:
IllegalArgumentException- iflogicalTypeisnull, or the logical type is already set
-
typeLength
Set the fixed byte length of aFIXED_LEN_BYTE_ARRAYleaf. It is necessary only if the annotation does not imply a length.- Throws:
IllegalArgumentException- if the type length is already set. The leaf declaration rejects a length that is not positive, or a length on a leaf that is notFIXED_LEN_BYTE_ARRAY.
-
fieldId
Set the field id (field_idinparquet.thrift).- Throws:
IllegalArgumentException- if the field id is already set
-