pub struct PartitionPruningStatistics { /* private fields */ }
Expand description
Prune files based on their partition values.
This is used both at planning time and execution time to prune
files based on their partition values.
This feeds into CompositePruningStatistics
to allow pruning
with filters that depend both on partition columns and data columns
(e.g. WHERE partition_col = data_col
).
Implementations§
Source§impl PartitionPruningStatistics
impl PartitionPruningStatistics
Sourcepub fn try_new(
partition_values: Vec<Vec<ScalarValue>>,
partition_fields: Vec<Arc<Field>>,
) -> Result<PartitionPruningStatistics, DataFusionError>
pub fn try_new( partition_values: Vec<Vec<ScalarValue>>, partition_fields: Vec<Arc<Field>>, ) -> Result<PartitionPruningStatistics, DataFusionError>
Create a new instance of PartitionPruningStatistics
.
Args:
partition_values
: A vector of vectors ofScalarValue
s. The outer vector represents the containers while the inner vector represents the partition values for each column. Note that this is the opposite of the order of the partition columns inPartitionPruningStatistics::partition_schema
.partition_schema
: The schema of the partition columns. This must not be the schema of the entire file or table: instead it must only be the schema of the partition columns, in the same order as the values inpartition_values
.
Trait Implementations§
Source§impl Clone for PartitionPruningStatistics
impl Clone for PartitionPruningStatistics
Source§fn clone(&self) -> PartitionPruningStatistics
fn clone(&self) -> PartitionPruningStatistics
Returns a duplicate 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 PruningStatistics for PartitionPruningStatistics
impl PruningStatistics for PartitionPruningStatistics
Source§fn min_values(&self, column: &Column) -> Option<Arc<dyn Array>>
fn min_values(&self, column: &Column) -> Option<Arc<dyn Array>>
Return the minimum values for the named column, if known. Read more
Source§fn max_values(&self, column: &Column) -> Option<Arc<dyn Array>>
fn max_values(&self, column: &Column) -> Option<Arc<dyn Array>>
Return the maximum values for the named column, if known. Read more
Source§fn num_containers(&self) -> usize
fn num_containers(&self) -> usize
Return the number of containers (e.g. Row Groups) being pruned with
these statistics. Read more
Source§fn null_counts(&self, _column: &Column) -> Option<Arc<dyn Array>>
fn null_counts(&self, _column: &Column) -> Option<Arc<dyn Array>>
Return the number of null values for the named column as an
UInt64Array
Read moreSource§fn row_counts(&self, _column: &Column) -> Option<Arc<dyn Array>>
fn row_counts(&self, _column: &Column) -> Option<Arc<dyn Array>>
Return the number of rows for the named column in each container
as an
UInt64Array
. Read moreSource§fn contained(
&self,
column: &Column,
values: &HashSet<ScalarValue>,
) -> Option<BooleanArray>
fn contained( &self, column: &Column, values: &HashSet<ScalarValue>, ) -> Option<BooleanArray>
Returns
BooleanArray
where each row represents information known
about specific literal values
in a column. Read moreAuto Trait Implementations§
impl Freeze for PartitionPruningStatistics
impl !RefUnwindSafe for PartitionPruningStatistics
impl Send for PartitionPruningStatistics
impl Sync for PartitionPruningStatistics
impl Unpin for PartitionPruningStatistics
impl !UnwindSafe for PartitionPruningStatistics
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
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>
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