pub struct PartitionPruningStatistics {
partition_values: Vec<ArrayRef>,
num_containers: usize,
partition_schema: SchemaRef,
}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).
Fields§
§partition_values: Vec<ArrayRef>Values for each column for each container.
The outer vectors represent the columns while the inner vectors
represent the containers. The order must match the order of the
partition columns in PartitionPruningStatistics::partition_schema.
num_containers: usizeThe number of containers.
Stored since the partition values are column-major and if there are no columns we wouldn’t know the number of containers.
partition_schema: SchemaRefThe schema of the partition columns.
This must not be the schema of the entire file or table: it must
only be the schema of the partition columns, in the same order as the
values in PartitionPruningStatistics::partition_values.
Implementations§
Source§impl PartitionPruningStatistics
impl PartitionPruningStatistics
Sourcepub fn try_new(
partition_values: Vec<Vec<ScalarValue>>,
partition_fields: Vec<FieldRef>,
) -> Result<Self, DataFusionError>
pub fn try_new( partition_values: Vec<Vec<ScalarValue>>, partition_fields: Vec<FieldRef>, ) -> Result<Self, DataFusionError>
Create a new instance of PartitionPruningStatistics.
Args:
partition_values: A vector of vectors ofScalarValues. 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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl PruningStatistics for PartitionPruningStatistics
impl PruningStatistics for PartitionPruningStatistics
Source§fn min_values(&self, column: &Column) -> Option<ArrayRef>
fn min_values(&self, column: &Column) -> Option<ArrayRef>
Source§fn max_values(&self, column: &Column) -> Option<ArrayRef>
fn max_values(&self, column: &Column) -> Option<ArrayRef>
Source§fn num_containers(&self) -> usize
fn num_containers(&self) -> usize
Source§fn null_counts(&self, _column: &Column) -> Option<ArrayRef>
fn null_counts(&self, _column: &Column) -> Option<ArrayRef>
UInt64Array Read moreSource§fn row_counts(&self, _column: &Column) -> Option<ArrayRef>
fn row_counts(&self, _column: &Column) -> Option<ArrayRef>
UInt64Array. 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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