pub struct ExprStatisticsGraphNode {
expr: Arc<dyn PhysicalExpr>,
dist: Distribution,
}Expand description
This is a node in the DAEG; it encapsulates a reference to the actual
PhysicalExpr as well as its statistics/distribution.
Fields§
§expr: Arc<dyn PhysicalExpr>§dist: DistributionImplementations§
Source§impl ExprStatisticsGraphNode
impl ExprStatisticsGraphNode
Sourcefn new_uniform(expr: Arc<dyn PhysicalExpr>, interval: Interval) -> Result<Self>
fn new_uniform(expr: Arc<dyn PhysicalExpr>, interval: Interval) -> Result<Self>
Constructs a new DAEG node based on the given interval with a
Uniform distribution.
Sourcefn new_bernoulli(expr: Arc<dyn PhysicalExpr>) -> Result<Self>
fn new_bernoulli(expr: Arc<dyn PhysicalExpr>) -> Result<Self>
Constructs a new DAEG node with a Bernoulli distribution having an
unknown success probability.
Sourcefn new_generic(expr: Arc<dyn PhysicalExpr>, dt: &DataType) -> Result<Self>
fn new_generic(expr: Arc<dyn PhysicalExpr>, dt: &DataType) -> Result<Self>
Constructs a new DAEG node with a Generic distribution having no
definite summary statistics.
Sourcepub fn distribution(&self) -> &Distribution
pub fn distribution(&self) -> &Distribution
Get the [Distribution] object representing the statistics of the
expression.
Sourcepub fn make_node(
node: &ExprTreeNode<NodeIndex>,
schema: &Schema,
) -> Result<Self>
pub fn make_node( node: &ExprTreeNode<NodeIndex>, schema: &Schema, ) -> Result<Self>
This function creates a DAEG node from DataFusion’s ExprTreeNode
object. Literals are created with Uniform distributions with a
definite, singleton interval. Expressions with a Boolean data type
result in aBernoulli distribution with an unknown success probability.
Any other expression starts with an Unknown distribution with an
indefinite range (i.e. [-∞, ∞]).
Trait Implementations§
Source§impl Clone for ExprStatisticsGraphNode
impl Clone for ExprStatisticsGraphNode
Source§fn clone(&self) -> ExprStatisticsGraphNode
fn clone(&self) -> ExprStatisticsGraphNode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ExprStatisticsGraphNode
impl !RefUnwindSafe for ExprStatisticsGraphNode
impl Send for ExprStatisticsGraphNode
impl Sync for ExprStatisticsGraphNode
impl Unpin for ExprStatisticsGraphNode
impl !UnwindSafe for ExprStatisticsGraphNode
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