pub struct LazyJsonLineReader { /* private fields */ }
Available on crate feature
lazy
only.Implementations§
Source§impl LazyJsonLineReader
impl LazyJsonLineReader
pub fn new_paths(paths: Arc<[PathBuf]>) -> LazyJsonLineReader
pub fn new_with_sources(sources: ScanSources) -> LazyJsonLineReader
pub fn new(path: impl AsRef<Path>) -> LazyJsonLineReader
Sourcepub fn with_row_index(self, row_index: Option<RowIndex>) -> LazyJsonLineReader
pub fn with_row_index(self, row_index: Option<RowIndex>) -> LazyJsonLineReader
Add a row index column.
Sourcepub fn with_ignore_errors(self, ignore_errors: bool) -> LazyJsonLineReader
pub fn with_ignore_errors(self, ignore_errors: bool) -> LazyJsonLineReader
Set values as Null
if parsing fails because of schema mismatches.
Sourcepub fn with_n_rows(self, num_rows: Option<usize>) -> LazyJsonLineReader
pub fn with_n_rows(self, num_rows: Option<usize>) -> LazyJsonLineReader
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<NonZero<usize>>,
) -> LazyJsonLineReader
pub fn with_infer_schema_length( self, num_rows: Option<NonZero<usize>>, ) -> LazyJsonLineReader
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<Arc<Schema<DataType>>>,
) -> LazyJsonLineReader
pub fn with_schema( self, schema: Option<Arc<Schema<DataType>>>, ) -> LazyJsonLineReader
Set the JSON file’s schema
Sourcepub fn with_schema_overwrite(
self,
schema_overwrite: Option<Arc<Schema<DataType>>>,
) -> LazyJsonLineReader
pub fn with_schema_overwrite( self, schema_overwrite: Option<Arc<Schema<DataType>>>, ) -> LazyJsonLineReader
Set the JSON file’s schema
Sourcepub fn low_memory(self, toggle: bool) -> LazyJsonLineReader
pub fn low_memory(self, toggle: bool) -> LazyJsonLineReader
Reduce memory usage at the expense of performance
pub fn with_batch_size( self, batch_size: Option<NonZero<usize>>, ) -> LazyJsonLineReader
pub fn with_cloud_options( self, cloud_options: Option<CloudOptions>, ) -> LazyJsonLineReader
pub fn with_include_file_paths( self, include_file_paths: Option<PlSmallStr>, ) -> LazyJsonLineReader
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) -> LazyJsonLineReader
fn with_rechunk(self, toggle: bool) -> LazyJsonLineReader
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) -> Result<LazyFrame, PolarsError>
fn finish_no_glob(self) -> Result<LazyFrame, PolarsError>
Source§fn with_sources(self, sources: ScanSources) -> LazyJsonLineReader
fn with_sources(self, sources: ScanSources) -> LazyJsonLineReader
Set sources of the scanned files.
Source§fn with_n_rows(self, n_rows: impl Into<Option<usize>>) -> LazyJsonLineReader
fn with_n_rows(self, n_rows: impl Into<Option<usize>>) -> LazyJsonLineReader
Configure the row limit.
Source§fn with_row_index(
self,
row_index: impl Into<Option<RowIndex>>,
) -> LazyJsonLineReader
fn with_row_index( self, row_index: impl Into<Option<RowIndex>>, ) -> LazyJsonLineReader
Configure the row index.
Source§fn concat_impl(&self, lfs: Vec<LazyFrame>) -> Result<LazyFrame, PolarsError>
fn concat_impl(&self, lfs: Vec<LazyFrame>) -> Result<LazyFrame, PolarsError>
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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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