pub struct CsvReadOptions {
pub has_header: bool,
pub delimiter: u8,
pub quote_char: Option<u8>,
pub null_values: Vec<String>,
pub infer_schema_length: usize,
pub projection: Option<Vec<String>>,
pub predicate: Option<Expr>,
}Expand description
I/O option types. Options for reading CSV files.
Fields§
§has_header: boolWhether the CSV file has a header row.
delimiter: u8Field delimiter byte (e.g. b',').
quote_char: Option<u8>Quote character byte (defaults to Some(b'\"')).
null_values: Vec<String>Values that should be interpreted as null.
infer_schema_length: usizeMaximum number of rows used for schema inference.
projection: Option<Vec<String>>Optional column projection (names).
predicate: Option<Expr>Optional predicate expression to apply (may be pushed down in the future).
Implementations§
Source§impl CsvReadOptions
impl CsvReadOptions
Sourcepub fn with_has_header(self, has_header: bool) -> Self
pub fn with_has_header(self, has_header: bool) -> Self
Set has_header.
Sourcepub fn with_delimiter(self, delimiter: u8) -> Self
pub fn with_delimiter(self, delimiter: u8) -> Self
Set delimiter.
Sourcepub fn with_quote_char(self, quote_char: Option<u8>) -> Self
pub fn with_quote_char(self, quote_char: Option<u8>) -> Self
Set quote_char.
Sourcepub fn with_null_values<I, S>(self, values: I) -> Self
pub fn with_null_values<I, S>(self, values: I) -> Self
Set null_values.
Sourcepub fn with_infer_schema_length(self, infer_schema_length: usize) -> Self
pub fn with_infer_schema_length(self, infer_schema_length: usize) -> Self
Set infer_schema_length.
Sourcepub fn with_projection<I, S>(self, columns: I) -> Self
pub fn with_projection<I, S>(self, columns: I) -> Self
Set a column projection by name.
Sourcepub fn with_predicate(self, predicate: Expr) -> Self
pub fn with_predicate(self, predicate: Expr) -> Self
Set a predicate to apply.
Trait Implementations§
Source§impl Clone for CsvReadOptions
impl Clone for CsvReadOptions
Source§fn clone(&self) -> CsvReadOptions
fn clone(&self) -> CsvReadOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CsvReadOptions
impl Debug for CsvReadOptions
Auto Trait Implementations§
impl Freeze for CsvReadOptions
impl RefUnwindSafe for CsvReadOptions
impl Send for CsvReadOptions
impl Sync for CsvReadOptions
impl Unpin for CsvReadOptions
impl UnwindSafe for CsvReadOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more