pub struct ReaderFactory { /* private fields */ }Expand description
A custom [ParquetFileReaderFactory] that handles opening parquet files
from object storage, and loads metadata on-demand.
Metadata is cached globally across all readers and queries via a shared
MetadataCache, significantly reducing database fetches for repeated
queries on the same partitions.
File contents are cached via a shared FileCache with thundering herd
protection, reducing object storage reads for frequently accessed files.
Implementations§
Source§impl ReaderFactory
impl ReaderFactory
Sourcepub fn new(
object_store: Arc<dyn ObjectStore>,
pool: Pool<Postgres>,
metadata_cache: Arc<MetadataCache>,
file_cache: Arc<FileCache>,
) -> ReaderFactory
pub fn new( object_store: Arc<dyn ObjectStore>, pool: Pool<Postgres>, metadata_cache: Arc<MetadataCache>, file_cache: Arc<FileCache>, ) -> ReaderFactory
Creates a new ReaderFactory with shared metadata and file caches.
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 !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> 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].