Struct parquet::schema::types::PrimitiveTypeBuilder [−][src]
pub struct PrimitiveTypeBuilder<'a> { /* fields omitted */ }A builder for primitive types. All attributes are optional
except the name and physical type.
Note that if not specified explicitly, Repetition::OPTIONAL is used.
Methods
impl<'a> PrimitiveTypeBuilder<'a>[src]
impl<'a> PrimitiveTypeBuilder<'a>pub fn new(name: &'a str, physical_type: PhysicalType) -> Self[src]
pub fn new(name: &'a str, physical_type: PhysicalType) -> SelfCreates new primitive type builder with provided field name and physical type.
pub fn with_repetition(self, repetition: Repetition) -> Self[src]
pub fn with_repetition(self, repetition: Repetition) -> SelfSets Repetition for this field and returns itself.
pub fn with_logical_type(self, logical_type: LogicalType) -> Self[src]
pub fn with_logical_type(self, logical_type: LogicalType) -> SelfSets LogicalType for this field and returns itself.
pub fn with_length(self, length: i32) -> Self[src]
pub fn with_length(self, length: i32) -> SelfSets type length and returns itself.
This is only applied to FIXED_LEN_BYTE_ARRAY and INT96 (INTERVAL) types, because
they maintain fixed size underlying byte array.
By default, value is 0.
pub fn with_precision(self, precision: i32) -> Self[src]
pub fn with_precision(self, precision: i32) -> SelfSets precision for Parquet DECIMAL physical type and returns itself.
By default, it equals to 0 and used only for decimal context.
pub fn with_scale(self, scale: i32) -> Self[src]
pub fn with_scale(self, scale: i32) -> SelfSets scale for Parquet DECIMAL physical type and returns itself.
By default, it equals to 0 and used only for decimal context.
pub fn with_id(self, id: i32) -> Self[src]
pub fn with_id(self, id: i32) -> SelfSets optional field id and returns itself.
pub fn build(self) -> Result<Type>[src]
pub fn build(self) -> Result<Type>Creates a new PrimitiveType instance from the collected attributes.
Returns Err in case of any building conditions are not met.
Auto Trait Implementations
impl<'a> Send for PrimitiveTypeBuilder<'a>
impl<'a> Send for PrimitiveTypeBuilder<'a>impl<'a> Sync for PrimitiveTypeBuilder<'a>
impl<'a> Sync for PrimitiveTypeBuilder<'a>