pub enum FileTypeWriterOptions {
    Parquet(ParquetWriterOptions),
    CSV(CsvWriterOptions),
    JSON(JsonWriterOptions),
    Avro(AvroWriterOptions),
    Arrow(ArrowWriterOptions),
}
Expand description

This type contains all options needed to initialize a particular RecordBatchWriter type. Each element in the enum contains a thin wrapper around a “writer builder” type (e.g. arrow::csv::WriterBuilder) plus any DataFusion specific writing options (e.g. CSV compression)

Variants§

Implementations§

source§

impl FileTypeWriterOptions

source

pub fn build( file_type: &FileType, config_defaults: &ConfigOptions, statement_options: &StatementOptions ) -> Result<Self>

Constructs a FileTypeWriterOptions given a FileType to be written and arbitrary String tuple options. May return an error if any string setting is unrecognized or unsupported.

source

pub fn build_default( file_type: &FileType, config_defaults: &ConfigOptions ) -> Result<Self>

Constructs a FileTypeWriterOptions from session defaults only.

source

pub fn try_into_parquet(&self) -> Result<&ParquetWriterOptions>

Tries to extract ParquetWriterOptions from this FileTypeWriterOptions enum. Returns an error if a different type from parquet is set.

source

pub fn try_into_csv(&self) -> Result<&CsvWriterOptions>

Tries to extract CsvWriterOptions from this FileTypeWriterOptions enum. Returns an error if a different type from csv is set.

source

pub fn try_into_json(&self) -> Result<&JsonWriterOptions>

Tries to extract JsonWriterOptions from this FileTypeWriterOptions enum. Returns an error if a different type from json is set.

source

pub fn try_into_avro(&self) -> Result<&AvroWriterOptions>

Tries to extract AvroWriterOptions from this FileTypeWriterOptions enum. Returns an error if a different type from avro is set.

source

pub fn try_into_arrow(&self) -> Result<&ArrowWriterOptions>

Tries to extract ArrowWriterOptions from this FileTypeWriterOptions enum. Returns an error if a different type from arrow is set.

Trait Implementations§

source§

impl Clone for FileTypeWriterOptions

source§

fn clone(&self) -> FileTypeWriterOptions

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 FileTypeWriterOptions

source§

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

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

impl Display for FileTypeWriterOptions

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 Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> ToOwned for Twhere T: Clone,

§

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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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 Twhere T: RefUnwindSafe + Send + Sync,