Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
CsvOptions in datafusion_common::config - Rust
[go: Go Back, main page]

Struct datafusion_common::config::CsvOptions

source ·
pub struct CsvOptions {
    pub has_header: bool,
    pub delimiter: u8,
    pub quote: u8,
    pub escape: Option<u8>,
    pub compression: CompressionTypeVariant,
    pub schema_infer_max_rec: usize,
    pub date_format: Option<String>,
    pub datetime_format: Option<String>,
    pub timestamp_format: Option<String>,
    pub timestamp_tz_format: Option<String>,
    pub time_format: Option<String>,
    pub null_value: Option<String>,
}
Expand description

Options controlling CSV format

Fields§

§has_header: bool§delimiter: u8§quote: u8§escape: Option<u8>§compression: CompressionTypeVariant§schema_infer_max_rec: usize§date_format: Option<String>§datetime_format: Option<String>§timestamp_format: Option<String>§timestamp_tz_format: Option<String>§time_format: Option<String>§null_value: Option<String>

Implementations§

source§

impl CsvOptions

source

pub fn with_compression( self, compression_type_variant: CompressionTypeVariant ) -> Self

Set a limit in terms of records to scan to infer the schema

  • default to DEFAULT_SCHEMA_INFER_MAX_RECORD
source

pub fn with_schema_infer_max_rec(self, max_rec: usize) -> Self

Set a limit in terms of records to scan to infer the schema

  • default to DEFAULT_SCHEMA_INFER_MAX_RECORD
source

pub fn with_has_header(self, has_header: bool) -> Self

Set true to indicate that the first line is a header.

  • default to true
source

pub fn has_header(&self) -> bool

True if the first line is a header.

source

pub fn with_delimiter(self, delimiter: u8) -> Self

The character separating values within a row.

  • default to ‘,’
source

pub fn with_quote(self, quote: u8) -> Self

The quote character in a row.

  • default to ‘“’
source

pub fn with_escape(self, escape: Option<u8>) -> Self

The escape character in a row.

  • default is None
source

pub fn with_file_compression_type( self, compression: CompressionTypeVariant ) -> Self

Set a CompressionTypeVariant of CSV

  • defaults to CompressionTypeVariant::UNCOMPRESSED
source

pub fn delimiter(&self) -> u8

The delimiter character.

source

pub fn quote(&self) -> u8

The quote character.

source

pub fn escape(&self) -> Option<u8>

The escape character.

Trait Implementations§

source§

impl Clone for CsvOptions

source§

fn clone(&self) -> CsvOptions

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 ConfigField for CsvOptions

source§

fn set(&mut self, key: &str, value: &str) -> Result<()>

source§

fn visit<V: Visit>( &self, v: &mut V, key_prefix: &str, _description: &'static str )

source§

impl Debug for CsvOptions

source§

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

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

impl Default for CsvOptions

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl PartialEq for CsvOptions

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<&CsvOptions> for CsvWriterOptions

§

type Error = DataFusionError

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

fn try_from(value: &CsvOptions) -> Result<Self>

Performs the conversion.
source§

impl StructuralPartialEq for CsvOptions

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> ToOwned for T
where 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, U> TryFrom<U> for T
where 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 T
where 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.
source§

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