Enum parquet::data_type::Decimal[][src]

pub enum Decimal {
    Int32 {
        value: [u8; 4],
        precision: i32,
        scale: i32,
    },
    Int64 {
        value: [u8; 8],
        precision: i32,
        scale: i32,
    },
    Bytes {
        value: ByteArray,
        precision: i32,
        scale: i32,
    },
}

Rust representation for Decimal values.

This is not a representation of Parquet physical type, but rather a wrapper for DECIMAL logical type, and serves as container for raw parts of decimal values: unscaled value in bytes, precision and scale.

Variants

Decimal backed by i32.

Fields of Int32

Decimal backed by i64.

Fields of Int64

Decimal backed by byte array.

Fields of Bytes

Methods

impl Decimal
[src]

Creates new decimal value from i32.

Creates new decimal value from i64.

Creates new decimal value from ByteArray.

Returns bytes of unscaled value.

Returns decimal precision.

Returns decimal scale.

Trait Implementations

impl Clone for Decimal
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Decimal
[src]

Formats the value using the given formatter. Read more

impl Default for Decimal
[src]

Returns the "default value" for a type. Read more

impl PartialEq for Decimal
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl AsBytes for Decimal
[src]

Returns slice of bytes for this data type.

Auto Trait Implementations

impl !Send for Decimal

impl !Sync for Decimal