pub struct ReaderFactory { /* private fields */ }Expand description
A custom [ParquetFileReaderFactory] that handles opening parquet files
from object storage, and loads metadata on-demand.
Parsed metadata is cached globally across all readers and queries via a shared
MetadataCache, significantly reducing repeated object-storage footer reads for
repeated queries on the same partitions.
File content caching is the responsibility of object_store itself: this
factory is typically constructed with an object store already wrapped by the
in-process L1 cache (see object_cache::l1_wrap), so it just reads bytes
through it directly.
Implementations§
Source§impl ReaderFactory
impl ReaderFactory
Sourcepub fn new(
object_store: Arc<dyn ObjectStore>,
metadata_cache: Arc<MetadataCache>,
) -> ReaderFactory
pub fn new( object_store: Arc<dyn ObjectStore>, metadata_cache: Arc<MetadataCache>, ) -> ReaderFactory
Creates a new ReaderFactory with a shared metadata cache, reading file
contents through object_store.
Trait Implementations§
Source§impl Debug for ReaderFactory
impl Debug for ReaderFactory
Source§impl ParquetFileReaderFactory for ReaderFactory
impl ParquetFileReaderFactory for ReaderFactory
Source§fn create_reader(
&self,
partition_index: usize,
partitioned_file: PartitionedFile,
_metadata_size_hint: Option<usize>,
metrics: &ExecutionPlanMetricsSet,
) -> Result<Box<dyn AsyncFileReader + Send>, DataFusionError>
fn create_reader( &self, partition_index: usize, partitioned_file: PartitionedFile, _metadata_size_hint: Option<usize>, metrics: &ExecutionPlanMetricsSet, ) -> Result<Box<dyn AsyncFileReader + Send>, DataFusionError>
Provides an
AsyncFileReader for reading data from a parquet file specified Read moreAuto Trait Implementations§
impl Freeze for ReaderFactory
impl !RefUnwindSafe for ReaderFactory
impl Send for ReaderFactory
impl Sync for ReaderFactory
impl Unpin for ReaderFactory
impl UnsafeUnpin for ReaderFactory
impl !UnwindSafe for ReaderFactory
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> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].