pub struct LazyJsonLineReader { /* private fields */ }
Available on crate feature
json
only.Implementations§
Source§impl LazyJsonLineReader
impl LazyJsonLineReader
pub fn new_paths(paths: Arc<[PathBuf]>) -> Self
pub fn new_with_sources(sources: ScanSources) -> Self
pub fn new(path: impl AsRef<Path>) -> Self
Sourcepub fn with_row_index(self, row_index: Option<RowIndex>) -> Self
pub fn with_row_index(self, row_index: Option<RowIndex>) -> Self
Add a row index column.
Sourcepub fn with_ignore_errors(self, ignore_errors: bool) -> Self
pub fn with_ignore_errors(self, ignore_errors: bool) -> Self
Set values as Null
if parsing fails because of schema mismatches.
Sourcepub fn with_n_rows(self, num_rows: Option<usize>) -> Self
pub fn with_n_rows(self, num_rows: Option<usize>) -> Self
Try to stop parsing when n
rows are parsed. During multithreaded parsing the upper bound n
cannot
be guaranteed.
Sourcepub fn with_infer_schema_length(self, num_rows: Option<NonZeroUsize>) -> Self
pub fn with_infer_schema_length(self, num_rows: Option<NonZeroUsize>) -> Self
Set the number of rows to use when inferring the json schema.
the default is 100 rows.
Ignored when the schema is specified explicitly using Self::with_schema
.
Setting to None
will do a full table scan, very slow.
Sourcepub fn with_schema(self, schema: Option<SchemaRef>) -> Self
pub fn with_schema(self, schema: Option<SchemaRef>) -> Self
Set the JSON file’s schema
Sourcepub fn with_schema_overwrite(self, schema_overwrite: Option<SchemaRef>) -> Self
pub fn with_schema_overwrite(self, schema_overwrite: Option<SchemaRef>) -> Self
Set the JSON file’s schema
Sourcepub fn low_memory(self, toggle: bool) -> Self
pub fn low_memory(self, toggle: bool) -> Self
Reduce memory usage at the expense of performance
pub fn with_batch_size(self, batch_size: Option<NonZeroUsize>) -> Self
pub fn with_cloud_options(self, cloud_options: Option<CloudOptions>) -> Self
pub fn with_include_file_paths( self, include_file_paths: Option<PlSmallStr>, ) -> Self
Trait Implementations§
Source§impl Clone for LazyJsonLineReader
impl Clone for LazyJsonLineReader
Source§fn clone(&self) -> LazyJsonLineReader
fn clone(&self) -> LazyJsonLineReader
Returns a copy 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 LazyFileListReader for LazyJsonLineReader
impl LazyFileListReader for LazyJsonLineReader
Source§fn with_rechunk(self, toggle: bool) -> Self
fn with_rechunk(self, toggle: bool) -> Self
Rechunk the memory to contiguous chunks when parsing is done.
Source§fn n_rows(&self) -> Option<usize>
fn n_rows(&self) -> Option<usize>
Try to stop parsing when n
rows are parsed. During multithreaded parsing the upper bound n
cannot
be guaranteed.
Source§fn cloud_options(&self) -> Option<&CloudOptions>
fn cloud_options(&self) -> Option<&CloudOptions>
CloudOptions used to list files.
Source§fn finish_no_glob(self) -> PolarsResult<LazyFrame>
fn finish_no_glob(self) -> PolarsResult<LazyFrame>
Source§fn with_sources(self, sources: ScanSources) -> Self
fn with_sources(self, sources: ScanSources) -> Self
Set sources of the scanned files.
Source§fn with_row_index(self, row_index: impl Into<Option<RowIndex>>) -> Self
fn with_row_index(self, row_index: impl Into<Option<RowIndex>>) -> Self
Configure the row index.
fn glob(&self) -> bool
Source§fn with_paths(self, paths: Arc<[PathBuf]>) -> Self
fn with_paths(self, paths: Arc<[PathBuf]>) -> Self
Set paths of the scanned files.
Auto Trait Implementations§
impl Freeze for LazyJsonLineReader
impl !RefUnwindSafe for LazyJsonLineReader
impl Send for LazyJsonLineReader
impl Sync for LazyJsonLineReader
impl Unpin for LazyJsonLineReader
impl !UnwindSafe for LazyJsonLineReader
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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