Struct datafusion::datasource::listing::PartitionedFile
source · pub struct PartitionedFile {
pub object_meta: ObjectMeta,
pub partition_values: Vec<ScalarValue>,
pub range: Option<FileRange>,
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: ObjectMetaPath 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
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
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Converts to this type from the input type.
Auto Trait Implementations§
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
Mutably borrows from an owned value. Read more