pub struct ParquetAsyncReader { /* private fields */ }
Available on crate features
polars-io
and cloud
only.Expand description
A Parquet reader on top of the async object_store API. Only the batch reader is implemented since parquet files on cloud storage tend to be big and slow to access.
Implementations§
Source§impl ParquetAsyncReader
impl ParquetAsyncReader
pub async fn from_uri( uri: &str, cloud_options: Option<&CloudOptions>, metadata: Option<Arc<FileMetadata>>, ) -> Result<ParquetAsyncReader, PolarsError>
pub async fn with_arrow_schema_projection( self, first_schema: &Arc<Schema<Field>>, projected_arrow_schema: Option<&Schema<Field>>, allow_missing_columns: bool, ) -> Result<ParquetAsyncReader, PolarsError>
pub async fn schema(&mut self) -> Result<Arc<Schema<Field>>, PolarsError>
pub async fn num_rows(&mut self) -> Result<usize, PolarsError>
Sourcepub fn with_slice(self, slice: Option<(usize, usize)>) -> ParquetAsyncReader
pub fn with_slice(self, slice: Option<(usize, usize)>) -> ParquetAsyncReader
Only positive offsets are supported for simplicity - the caller should translate negative offsets into the positive equivalent.
pub fn with_row_index(self, row_index: Option<RowIndex>) -> ParquetAsyncReader
pub fn set_rechunk(self, rechunk: bool) -> ParquetAsyncReader
pub fn with_projection( self, projection: Option<Vec<usize>>, ) -> ParquetAsyncReader
pub fn with_predicate( self, predicate: Option<Arc<dyn PhysicalIoExpr>>, ) -> ParquetAsyncReader
Sourcepub fn use_statistics(self, toggle: bool) -> ParquetAsyncReader
pub fn use_statistics(self, toggle: bool) -> ParquetAsyncReader
Use statistics in the parquet to determine if pages can be skipped from reading.
pub fn with_hive_partition_columns( self, columns: Option<Vec<Series>>, ) -> ParquetAsyncReader
pub fn with_include_file_path( self, include_file_path: Option<(PlSmallStr, Arc<str>)>, ) -> ParquetAsyncReader
pub fn read_parallel(self, parallel: ParallelStrategy) -> ParquetAsyncReader
pub async fn batched( self, chunk_size: usize, ) -> Result<BatchedParquetReader, PolarsError>
pub async fn get_metadata(&mut self) -> Result<&Arc<FileMetadata>, PolarsError>
pub async fn finish(self) -> Result<DataFrame, PolarsError>
Auto Trait Implementations§
impl Freeze for ParquetAsyncReader
impl !RefUnwindSafe for ParquetAsyncReader
impl Send for ParquetAsyncReader
impl Sync for ParquetAsyncReader
impl Unpin for ParquetAsyncReader
impl !UnwindSafe for ParquetAsyncReader
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
§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