Struct deltalake::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 + Sync + Send>>,
}
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
extensions: Option<Arc<dyn Any + Sync + Send>>
An optional field for user defined per object metadata
Implementations§
source§impl PartitionedFile
impl PartitionedFile
sourcepub fn new(path: impl Into<String>, size: u64) -> PartitionedFile
pub fn new(path: impl Into<String>, size: u64) -> PartitionedFile
Create a simple file without metadata or partition
sourcepub fn new_with_range(
path: String,
size: u64,
start: i64,
end: i64
) -> PartitionedFile
pub fn new_with_range( path: String, size: u64, start: i64, end: i64 ) -> PartitionedFile
Create a file range without metadata or partition
sourcepub fn from_path(path: String) -> Result<PartitionedFile, DataFusionError>
pub fn from_path(path: String) -> Result<PartitionedFile, DataFusionError>
Return a file reference from the given path
sourcepub fn with_range(self, start: i64, end: i64) -> PartitionedFile
pub fn with_range(self, start: i64, end: i64) -> PartitionedFile
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) -> PartitionedFile
fn from(object_meta: ObjectMeta) -> PartitionedFile
source§impl TryFrom<&PartitionedFile> for PartitionedFile
impl TryFrom<&PartitionedFile> for PartitionedFile
§type Error = DataFusionError
type Error = DataFusionError
source§fn try_from(
val: &PartitionedFile
) -> Result<PartitionedFile, <PartitionedFile as TryFrom<&PartitionedFile>>::Error>
fn try_from( val: &PartitionedFile ) -> Result<PartitionedFile, <PartitionedFile as TryFrom<&PartitionedFile>>::Error>
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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>
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