pub struct PartitionedFile {
pub object_meta: ObjectMeta,
pub partition_values: Vec<ScalarValue>,
pub range: Option<FileRange>,
pub statistics: Option<Arc<Statistics>>,
pub extensions: Option<Arc<dyn Any + Send + Sync>>,
pub metadata_size_hint: Option<usize>,
}
Expand description
A single file or part of a file that should be read, along with its schema, statistics and partition column values that need to be appended to each row.
Fields§
§object_meta: ObjectMeta
Path for the file (e.g. URL, filesystem path, etc)
partition_values: Vec<ScalarValue>
Values of partition columns to be appended to each row.
These MUST have the same count, order, and type than the table_partition_cols
.
You may use wrap_partition_value_in_dict
to wrap them if you have used wrap_partition_type_in_dict
to wrap the column type.
range: Option<FileRange>
An optional file range for a more fine-grained parallel execution
statistics: Option<Arc<Statistics>>
Optional statistics that describe the data in this file if known.
DataFusion relies on these statistics for planning (in particular to sort file groups), so if they are incorrect, incorrect answers may result.
extensions: Option<Arc<dyn Any + Send + Sync>>
An optional field for user defined per object metadata
metadata_size_hint: Option<usize>
The estimated size of the parquet metadata, in bytes
Implementations§
Source§impl PartitionedFile
impl PartitionedFile
Sourcepub fn new(path: impl Into<String>, size: u64) -> Self
pub fn new(path: impl Into<String>, size: u64) -> Self
Create a simple file without metadata or partition
Sourcepub fn new_with_range(path: String, size: u64, start: i64, end: i64) -> Self
pub fn new_with_range(path: String, size: u64, start: i64, end: i64) -> Self
Create a file range without metadata or partition
Sourcepub fn with_metadata_size_hint(self, metadata_size_hint: usize) -> Self
pub fn with_metadata_size_hint(self, metadata_size_hint: usize) -> Self
Provide a hint to the size of the file metadata. If a hint is provided
the reader will try and fetch the last size_hint
bytes of the parquet file optimistically.
Without an appropriate hint, two read may be required to fetch the metadata.
Sourcepub fn with_range(self, start: i64, end: i64) -> Self
pub fn with_range(self, start: i64, end: i64) -> Self
Update the file to only scan the specified range (in bytes)
Sourcepub fn with_extensions(self, extensions: Arc<dyn Any + Send + Sync>) -> Self
pub fn with_extensions(self, extensions: Arc<dyn Any + Send + Sync>) -> Self
Update the user defined extensions for this file.
This can be used to pass reader specific information.
pub fn with_statistics(self, statistics: Arc<Statistics>) -> Self
Trait Implementations§
Source§impl Clone for PartitionedFile
impl Clone for PartitionedFile
Source§fn clone(&self) -> PartitionedFile
fn clone(&self) -> PartitionedFile
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PartitionedFile
impl Debug for PartitionedFile
Source§impl From<ObjectMeta> for PartitionedFile
impl From<ObjectMeta> for PartitionedFile
Source§fn from(object_meta: ObjectMeta) -> Self
fn from(object_meta: ObjectMeta) -> Self
Source§impl FromIterator<PartitionedFile> for FileGroup
impl FromIterator<PartitionedFile> for FileGroup
Source§fn from_iter<I: IntoIterator<Item = PartitionedFile>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = PartitionedFile>>(iter: I) -> Self
Auto Trait Implementations§
impl Freeze for PartitionedFile
impl !RefUnwindSafe for PartitionedFile
impl Send for PartitionedFile
impl Sync for PartitionedFile
impl Unpin for PartitionedFile
impl !UnwindSafe for PartitionedFile
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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