Class FileSchema.PrimitiveBuilder

java.lang.Object
dev.hardwood.schema.FileSchema.PrimitiveBuilder
Enclosing class:
FileSchema

public static final class FileSchema.PrimitiveBuilder extends Object
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 Details

    • logicalType

      public FileSchema.PrimitiveBuilder logicalType(LogicalType 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 - if logicalType is null, or the logical type is already set
    • typeLength

      public FileSchema.PrimitiveBuilder typeLength(int typeLength)
      Set the fixed byte length of a FIXED_LEN_BYTE_ARRAY leaf. 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 not FIXED_LEN_BYTE_ARRAY.
    • fieldId

      public FileSchema.PrimitiveBuilder fieldId(int fieldId)
      Set the field id (field_id in parquet.thrift).
      Throws:
      IllegalArgumentException - if the field id is already set