vcf2parquet::columndata

Enum ColumnData

Source
pub enum ColumnData {
    Bool(BooleanBuilder),
    Int(Int32Builder),
    Float(Float32Builder),
    String(StringBuilder),
    ListInt(ListBuilder<Int32Builder>),
    ListFloat(ListBuilder<Float32Builder>),
    ListString(ListBuilder<StringBuilder>),
}
Expand description

Stores arrow array builders for each column datatype

Variants§

§

Bool(BooleanBuilder)

Boolean column

§

Int(Int32Builder)

Int32 column

§

Float(Float32Builder)

Float32 column

§

String(StringBuilder)

String column

§

ListInt(ListBuilder<Int32Builder>)

List of int32 column

§

ListFloat(ListBuilder<Float32Builder>)

List of float32 column

§

ListString(ListBuilder<StringBuilder>)

List of string column

Implementations§

Source§

impl ColumnData

Source

pub fn new( arrow_type: &DataType, length: usize, field_name: &str, nullable: bool, ) -> Self

Creates a new ColumnData based on arrow type, length and field name

Source

pub fn push_null(&mut self)

Add a Null value in array

Source

pub fn len(&self) -> usize

Get the length of internal array

Source

pub fn is_empty(&self) -> bool

Check if array is empty (not used for now)

Source

pub fn push_bool(&mut self, value: bool)

Add a boolean value in array, if it’s not a boolean array failled

Source

pub fn push_i32(&mut self, value: Option<i32>)

Add a i32 value in array, if it’s not a integer array failled

Source

pub fn push_f32(&mut self, value: Option<f32>)

Add a f32 value in array, if it’s not a float array failled

Source

pub fn push_string(&mut self, value: String)

Add a string value in array, if it’s not a string array failled

Source

pub fn push_veci32(&mut self, value: Vec<Option<i32>>) -> Result<()>

Add a vector of integer value in array, if it’s not a vector of integer array failled

Source

pub fn push_vecf32(&mut self, value: Vec<Option<f32>>) -> Result<()>

Add a vector of float value in array, if it’s not a vector of float array failled

Source

pub fn push_vecstring(&mut self, value: Vec<Option<String>>) -> Result<()>

Add a vector of string value in array, if it’s not a vector of string array failled

Source

pub fn into_arc(self) -> Arc<dyn Array>

Convert ColumnData in Arrow2 array

Trait Implementations§

Source§

impl Debug for ColumnData

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> 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, 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,