parquet::record::api

Enum Field

Source
pub enum Field {
Show 22 variants Null, Bool(bool), Byte(i8), Short(i16), Int(i32), Long(i64), UByte(u8), UShort(u16), UInt(u32), ULong(u64), Float16(f16), Float(f32), Double(f64), Decimal(Decimal), Str(String), Bytes(ByteArray), Date(i32), TimestampMillis(i64), TimestampMicros(i64), Group(Row), ListInternal(List), MapInternal(Map),
}
Expand description

API to represent a single field in a Row.

Variants§

§

Null

Null value.

§

Bool(bool)

Boolean value (true, false).

§

Byte(i8)

Signed integer INT_8.

§

Short(i16)

Signed integer INT_16.

§

Int(i32)

Signed integer INT_32.

§

Long(i64)

Signed integer INT_64.

§

UByte(u8)

Unsigned integer UINT_8.

§

UShort(u16)

Unsigned integer UINT_16.

§

UInt(u32)

Unsigned integer UINT_32.

§

ULong(u64)

Unsigned integer UINT_64.

§

Float16(f16)

IEEE 16-bit floating point value.

§

Float(f32)

IEEE 32-bit floating point value.

§

Double(f64)

IEEE 64-bit floating point value.

§

Decimal(Decimal)

Decimal value.

§

Str(String)

UTF-8 encoded character string.

§

Bytes(ByteArray)

General binary value.

§

Date(i32)

Date without a time of day, stores the number of days from the Unix epoch, 1 January 1970.

§

TimestampMillis(i64)

Milliseconds from the Unix epoch, 1 January 1970.

§

TimestampMicros(i64)

Microseconds from the Unix epoch, 1 January 1970.

§

Group(Row)

Struct, child elements are tuples of field-value pairs.

§

ListInternal(List)

List of elements.

§

MapInternal(Map)

List of key-value pairs.

Implementations§

Source§

impl Field

Source

fn get_type_name(&self) -> &'static str

Get the type name.

Source

pub fn is_primitive(&self) -> bool

Determines if this Row represents a primitive value.

Source

pub fn convert_bool(_descr: &ColumnDescPtr, value: bool) -> Self

Converts Parquet BOOLEAN type with logical type into bool value.

Source

pub fn convert_int32(descr: &ColumnDescPtr, value: i32) -> Self

Converts Parquet INT32 type with converted type into i32 value.

Source

pub fn convert_int64(descr: &ColumnDescPtr, value: i64) -> Self

Converts Parquet INT64 type with converted type into i64 value.

Source

pub fn convert_int96(_descr: &ColumnDescPtr, value: Int96) -> Self

Converts Parquet INT96 (nanosecond timestamps) type and logical type into Timestamp value.

Source

pub fn convert_float(_descr: &ColumnDescPtr, value: f32) -> Self

Converts Parquet FLOAT type with logical type into f32 value.

Source

pub fn convert_double(_descr: &ColumnDescPtr, value: f64) -> Self

Converts Parquet DOUBLE type with converted type into f64 value.

Source

pub fn convert_byte_array( descr: &ColumnDescPtr, value: ByteArray, ) -> Result<Self>

Converts Parquet BYTE_ARRAY type with converted type into a UTF8 string, decimal, float16, or an array of bytes.

Source

pub fn to_json_value(&self) -> Value

Converts the Parquet field into a JSON Value.

Trait Implementations§

Source§

impl Clone for Field

Source§

fn clone(&self) -> Field

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Field

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Field

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Field

Source§

fn eq(&self, other: &Field) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Field

Auto Trait Implementations§

§

impl !Freeze for Field

§

impl RefUnwindSafe for Field

§

impl Send for Field

§

impl Sync for Field

§

impl Unpin for Field

§

impl UnwindSafe for Field

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T