pub struct NegativeExpr { /* private fields */ }
Expand description
Negative expression
Implementations§
Source§impl NegativeExpr
impl NegativeExpr
Sourcepub fn new(arg: Arc<dyn PhysicalExpr>) -> Self
pub fn new(arg: Arc<dyn PhysicalExpr>) -> Self
Create new not expression
Sourcepub fn arg(&self) -> &Arc<dyn PhysicalExpr>
pub fn arg(&self) -> &Arc<dyn PhysicalExpr>
Get the input expression
Trait Implementations§
Source§impl Debug for NegativeExpr
impl Debug for NegativeExpr
Source§impl Display for NegativeExpr
impl Display for NegativeExpr
Source§impl Hash for NegativeExpr
impl Hash for NegativeExpr
Source§impl PartialEq<dyn Any> for NegativeExpr
impl PartialEq<dyn Any> for NegativeExpr
Source§impl PhysicalExpr for NegativeExpr
impl PhysicalExpr for NegativeExpr
Source§fn evaluate_bounds(&self, children: &[&Interval]) -> Result<Interval>
fn evaluate_bounds(&self, children: &[&Interval]) -> Result<Interval>
Given the child interval of a NegativeExpr, it calculates the NegativeExpr’s interval.
It replaces the upper and lower bounds after multiplying them with -1.
Ex: (a, b]
=> [-b, -a)
Source§fn propagate_constraints(
&self,
interval: &Interval,
children: &[&Interval],
) -> Result<Option<Vec<Interval>>>
fn propagate_constraints( &self, interval: &Interval, children: &[&Interval], ) -> Result<Option<Vec<Interval>>>
Returns a new Interval
of a NegativeExpr that has the existing interval
given that
given the input interval is known to be children
.
Source§fn get_properties(&self, children: &[ExprProperties]) -> Result<ExprProperties>
fn get_properties(&self, children: &[ExprProperties]) -> Result<ExprProperties>
The ordering of a NegativeExpr
is simply the reverse of its child.
Source§fn data_type(&self, input_schema: &Schema) -> Result<DataType>
fn data_type(&self, input_schema: &Schema) -> Result<DataType>
Get the data type of this expression, given the schema of the input
Source§fn nullable(&self, input_schema: &Schema) -> Result<bool>
fn nullable(&self, input_schema: &Schema) -> Result<bool>
Determine whether this expression is nullable, given the schema of the input
Source§fn evaluate(&self, batch: &RecordBatch) -> Result<ColumnarValue>
fn evaluate(&self, batch: &RecordBatch) -> Result<ColumnarValue>
Evaluate an expression against a RecordBatch
Source§fn children(&self) -> Vec<&Arc<dyn PhysicalExpr>>
fn children(&self) -> Vec<&Arc<dyn PhysicalExpr>>
Get a list of child PhysicalExpr that provide the input for this expr.
Source§fn with_new_children(
self: Arc<Self>,
children: Vec<Arc<dyn PhysicalExpr>>,
) -> Result<Arc<dyn PhysicalExpr>>
fn with_new_children( self: Arc<Self>, children: Vec<Arc<dyn PhysicalExpr>>, ) -> Result<Arc<dyn PhysicalExpr>>
Returns a new PhysicalExpr where all children were replaced by new exprs.
Source§fn evaluate_selection(
&self,
batch: &RecordBatch,
selection: &BooleanArray,
) -> Result<ColumnarValue, DataFusionError>
fn evaluate_selection( &self, batch: &RecordBatch, selection: &BooleanArray, ) -> Result<ColumnarValue, DataFusionError>
Evaluate an expression against a RecordBatch after first applying a
validity array
Auto Trait Implementations§
impl Freeze for NegativeExpr
impl !RefUnwindSafe for NegativeExpr
impl Send for NegativeExpr
impl Sync for NegativeExpr
impl Unpin for NegativeExpr
impl !UnwindSafe for NegativeExpr
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> 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