#[non_exhaustive]pub struct Filter {
pub predicate: Expr,
pub input: Arc<LogicalPlan>,
pub having: bool,
}
Expand description
Filters rows from its input that do not match an expression (essentially a WHERE clause with a predicate expression).
Semantically, <predicate>
is evaluated for each row of the input;
If the value of <predicate>
is true, the input row is passed to
the output. If the value of <predicate>
is false, the row is
discarded.
Filter should not be created directly but instead use try_new()
and that these fields are only pub to support pattern matching
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.predicate: Expr
The predicate expression, which must have Boolean type.
input: Arc<LogicalPlan>
The incoming logical plan
having: bool
The flag to indicate if the filter is a having clause
Implementations§
Source§impl Filter
impl Filter
Sourcepub fn try_new(predicate: Expr, input: Arc<LogicalPlan>) -> Result<Self>
pub fn try_new(predicate: Expr, input: Arc<LogicalPlan>) -> Result<Self>
Create a new filter operator.
Notes: as Aliases have no effect on the output of a filter operator, they are removed from the predicate expression.
Sourcepub fn try_new_with_having(
predicate: Expr,
input: Arc<LogicalPlan>,
) -> Result<Self>
pub fn try_new_with_having( predicate: Expr, input: Arc<LogicalPlan>, ) -> Result<Self>
Create a new filter operator for a having clause. This is similar to a filter, but its having flag is set to true.
Trait Implementations§
Source§impl PartialOrd for Filter
impl PartialOrd for Filter
impl Eq for Filter
impl StructuralPartialEq for Filter
Auto Trait Implementations§
impl Freeze for Filter
impl !RefUnwindSafe for Filter
impl Send for Filter
impl Sync for Filter
impl Unpin for Filter
impl !UnwindSafe for Filter
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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<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