pub enum StatisticsRequest {
Min(Arc<Column>),
Max(Arc<Column>),
NullCount(Arc<Column>),
DistinctCount(Arc<Column>),
Sum(Arc<Column>),
ByteSize(Arc<Column>),
RowCount,
TotalByteSize,
}Expand description
A statistic a caller would like a provider to supply, if it can do so cheaply.
A small, query-aware extension to the existing Statistics model: instead
of “give me everything you have for every column”, a caller can ask for a
specific list of stats by name. StatisticsRequest is just that vocabulary
— DataFusion itself does not populate or consume it. It exists so a request
can be threaded from a TableScan (see TableScan::statistics_requests)
through ScanArgs::statistics_requests to a TableProvider, which is enough
for a query-aware statistics feature to be implemented outside of DataFusion.
Each variant maps onto a field of datafusion_common::Statistics /
datafusion_common::ColumnStatistics, so a provider that already
populates one can answer the request trivially.
The per-column variants hold an Arc<Column> rather than an owned
Column (which carries owned strings) so cloning a request — and the
BTreeSet<StatisticsRequest> stored on TableScan, which is cloned with
the plan during optimization — stays cheap.
Variants§
Min(Arc<Column>)
Smallest non-null value of column.
Max(Arc<Column>)
Largest non-null value of column.
NullCount(Arc<Column>)
Number of NULLs in column.
DistinctCount(Arc<Column>)
Number of distinct values in column (exact or estimated).
Sum(Arc<Column>)
Sum of values in column (numerics, widened per
ColumnStatistics::sum_value).
ByteSize(Arc<Column>)
Encoded/output byte size of column.
RowCount
Number of rows in the container (table / file).
TotalByteSize
Total byte size of the container’s output.
Trait Implementations§
Source§impl Clone for StatisticsRequest
impl Clone for StatisticsRequest
Source§fn clone(&self) -> StatisticsRequest
fn clone(&self) -> StatisticsRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StatisticsRequest
impl Debug for StatisticsRequest
impl Eq for StatisticsRequest
Source§impl Ord for StatisticsRequest
impl Ord for StatisticsRequest
Source§fn cmp(&self, other: &StatisticsRequest) -> Ordering
fn cmp(&self, other: &StatisticsRequest) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for StatisticsRequest
impl PartialEq for StatisticsRequest
Source§impl PartialOrd for StatisticsRequest
impl PartialOrd for StatisticsRequest
impl StructuralPartialEq for StatisticsRequest
Auto Trait Implementations§
impl Freeze for StatisticsRequest
impl RefUnwindSafe for StatisticsRequest
impl Send for StatisticsRequest
impl Sync for StatisticsRequest
impl Unpin for StatisticsRequest
impl UnsafeUnpin for StatisticsRequest
impl UnwindSafe for StatisticsRequest
Blanket Implementations§
impl<T> Allocation for T
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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