pub struct PartitionPruningStatistics { /* private fields */ }๐Deprecated since 52.0.0: This struct is no longer used internally. Use
replace_columns_with_literals from datafusion-physical-expr-adapter to substitute partition column values before pruning. It will be removed in 58.0.0 or 6 months after 52.0.0 is released, whichever comes first.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 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.
ยงExample
To create PartitionPruningStatistics for two partition columns a and b,
for three containers like this:
| a | b |
|---|---|
| 1 | 2 |
| 3 | 4 |
| 5 | 6 |
let partition_values = vec![
vec![ScalarValue::from(1i32), ScalarValue::from(2i32)],
vec![ScalarValue::from(3i32), ScalarValue::from(4i32)],
vec![ScalarValue::from(5i32), ScalarValue::from(6i32)],
];
let partition_fields = vec![
Arc::new(Field::new("a", DataType::Int32, false)),
Arc::new(Field::new("b", DataType::Int32, false)),
];
let partition_stats =
PartitionPruningStatistics::try_new(partition_values, partition_fields).unwrap();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 UnsafeUnpin for PartitionPruningStatistics
impl !UnwindSafe for PartitionPruningStatistics
Blanket Implementationsยง
Sourceยงimpl<T> AlignerFor<1> for T
impl<T> AlignerFor<1> for T
Sourceยงimpl<T> AlignerFor<1024> for T
impl<T> AlignerFor<1024> for T
Sourceยงtype Aligner = AlignTo1024<T>
type Aligner = AlignTo1024<T>
The
AlignTo* type which aligns Self to ALIGNMENT.Sourceยงimpl<T> AlignerFor<128> for T
impl<T> AlignerFor<128> for T
Sourceยงtype Aligner = AlignTo128<T>
type Aligner = AlignTo128<T>
The
AlignTo* type which aligns Self to ALIGNMENT.Sourceยงimpl<T> AlignerFor<16> for T
impl<T> AlignerFor<16> for T
Sourceยงimpl<T> AlignerFor<16384> for T
impl<T> AlignerFor<16384> for T
Sourceยงtype Aligner = AlignTo16384<T>
type Aligner = AlignTo16384<T>
The
AlignTo* type which aligns Self to ALIGNMENT.Sourceยงimpl<T> AlignerFor<2> for T
impl<T> AlignerFor<2> for T
Sourceยงimpl<T> AlignerFor<2048> for T
impl<T> AlignerFor<2048> for T
Sourceยงtype Aligner = AlignTo2048<T>
type Aligner = AlignTo2048<T>
The
AlignTo* type which aligns Self to ALIGNMENT.Sourceยงimpl<T> AlignerFor<256> for T
impl<T> AlignerFor<256> for T
Sourceยงtype Aligner = AlignTo256<T>
type Aligner = AlignTo256<T>
The
AlignTo* type which aligns Self to ALIGNMENT.Sourceยงimpl<T> AlignerFor<32> for T
impl<T> AlignerFor<32> for T
Sourceยงimpl<T> AlignerFor<32768> for T
impl<T> AlignerFor<32768> for T
Sourceยงtype Aligner = AlignTo32768<T>
type Aligner = AlignTo32768<T>
The
AlignTo* type which aligns Self to ALIGNMENT.Sourceยงimpl<T> AlignerFor<4> for T
impl<T> AlignerFor<4> for T
Sourceยงimpl<T> AlignerFor<4096> for T
impl<T> AlignerFor<4096> for T
Sourceยงtype Aligner = AlignTo4096<T>
type Aligner = AlignTo4096<T>
The
AlignTo* type which aligns Self to ALIGNMENT.Sourceยงimpl<T> AlignerFor<512> for T
impl<T> AlignerFor<512> for T
Sourceยงtype Aligner = AlignTo512<T>
type Aligner = AlignTo512<T>
The
AlignTo* type which aligns Self to ALIGNMENT.Sourceยงimpl<T> AlignerFor<64> for T
impl<T> AlignerFor<64> for T
Sourceยงimpl<T> AlignerFor<8> for T
impl<T> AlignerFor<8> for T
Sourceยงimpl<T> AlignerFor<8192> for T
impl<T> AlignerFor<8192> for T
Sourceยงtype Aligner = AlignTo8192<T>
type Aligner = AlignTo8192<T>
The
AlignTo* type which aligns Self to ALIGNMENT.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, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Sourceยงimpl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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>
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 moreSourceยงimpl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Sourceยงimpl<'a, T> RCowCompatibleRef<'a> for Twhere
T: Clone + 'a,
impl<'a, T> RCowCompatibleRef<'a> for Twhere
T: Clone + 'a,
Sourceยงfn as_c_ref(from: &'a T) -> <T as RCowCompatibleRef<'a>>::RefC
fn as_c_ref(from: &'a T) -> <T as RCowCompatibleRef<'a>>::RefC
Converts a reference to an FFI-safe type
Sourceยงfn as_rust_ref(from: <T as RCowCompatibleRef<'a>>::RefC) -> &'a T
fn as_rust_ref(from: <T as RCowCompatibleRef<'a>>::RefC) -> &'a T
Converts an FFI-safe type to a reference
Sourceยงimpl<S> ROExtAcc for S
impl<S> ROExtAcc for S
Sourceยงfn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F
fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F
Gets a reference to a field, determined by
offset. Read moreSourceยงfn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F
fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F
Gets a muatble reference to a field, determined by
offset. Read moreSourceยงfn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F
fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F
Gets a const pointer to a field,
the field is determined by
offset. Read moreSourceยงfn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F
fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F
Gets a mutable pointer to a field, determined by
offset. Read moreSourceยงimpl<S> ROExtOps<Aligned> for S
impl<S> ROExtOps<Aligned> for S
Sourceยงfn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F
fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F
Replaces a field (determined by
offset) with value,
returning the previous value of the field. Read moreSourceยงfn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> Fwhere
F: Copy,
fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> Fwhere
F: Copy,
Sourceยงimpl<S> ROExtOps<Unaligned> for S
impl<S> ROExtOps<Unaligned> for S
Sourceยงfn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F
fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F
Replaces a field (determined by
offset) with value,
returning the previous value of the field. Read moreSourceยงfn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> Fwhere
F: Copy,
fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> Fwhere
F: Copy,
Sourceยงimpl<T> SelfOps for Twhere
T: ?Sized,
impl<T> SelfOps for Twhere
T: ?Sized,
Sourceยงfn piped<F, U>(self, f: F) -> U
fn piped<F, U>(self, f: F) -> U
Emulates the pipeline operator, allowing method syntax in more places. Read more
Sourceยงfn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
fn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
The same as
piped except that the function takes &Self
Useful for functions that take &Self instead of Self. Read moreSourceยงfn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
fn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
The same as
piped, except that the function takes &mut Self.
Useful for functions that take &mut Self instead of Self.Sourceยงfn mutated<F>(self, f: F) -> Self
fn mutated<F>(self, f: F) -> Self
Mutates self using a closure taking self by mutable reference,
passing it along the method chain. Read more
Sourceยงfn observe<F>(self, f: F) -> Self
fn observe<F>(self, f: F) -> Self
Observes the value of self, passing it along unmodified.
Useful in long method chains. Read more
Sourceยงfn as_ref_<T>(&self) -> &T
fn as_ref_<T>(&self) -> &T
Performs a reference to reference conversion with
AsRef,
using the turbofish .as_ref_::<_>() syntax. Read moreSourceยงimpl<This> TransmuteElement for Thiswhere
This: ?Sized,
impl<This> TransmuteElement for Thiswhere
This: ?Sized,
Sourceยงunsafe fn transmute_element<T>(self) -> Self::TransmutedPtrwhere
Self: CanTransmuteElement<T>,
unsafe fn transmute_element<T>(self) -> Self::TransmutedPtrwhere
Self: CanTransmuteElement<T>,
Transmutes the element type of this pointer.. Read more
Sourceยงimpl<T> TypeIdentity for Twhere
T: ?Sized,
impl<T> TypeIdentity for Twhere
T: ?Sized,
Sourceยงfn as_type_mut(&mut self) -> &mut Self::Type
fn as_type_mut(&mut self) -> &mut Self::Type
Converts a mutable reference back to the original type.
Sourceยงfn into_type_box(self: Box<Self>) -> Box<Self::Type>
fn into_type_box(self: Box<Self>) -> Box<Self::Type>
Converts a box back to the original type.
Sourceยงfn into_type_arc(this: Arc<Self>) -> Arc<Self::Type>
fn into_type_arc(this: Arc<Self>) -> Arc<Self::Type>
Converts an Arc back to the original type. Read more
Sourceยงfn into_type_rc(this: Rc<Self>) -> Rc<Self::Type>
fn into_type_rc(this: Rc<Self>) -> Rc<Self::Type>
Converts an Rc back to the original type. Read more
Sourceยงfn from_type_ref(this: &Self::Type) -> &Self
fn from_type_ref(this: &Self::Type) -> &Self
Converts a reference back to the original type.
Sourceยงfn from_type_mut(this: &mut Self::Type) -> &mut Self
fn from_type_mut(this: &mut Self::Type) -> &mut Self
Converts a mutable reference back to the original type.
Sourceยงfn from_type_box(this: Box<Self::Type>) -> Box<Self>
fn from_type_box(this: Box<Self::Type>) -> Box<Self>
Converts a box back to the original type.