Struct datafusion::datasource::listing::PartitionedFile
source · pub struct PartitionedFile {
pub object_meta: ObjectMeta,
pub partition_values: Vec<ScalarValue>,
pub range: Option<FileRange>,
pub statistics: Option<Statistics>,
pub extensions: Option<Arc<dyn Any + Send + Sync>>,
}
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<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
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_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)
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
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> 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