pub struct DistinctOn {
pub on_expr: Vec<Expr>,
pub select_expr: Vec<Expr>,
pub sort_expr: Option<Vec<Sort>>,
pub input: Arc<LogicalPlan>,
pub schema: DFSchemaRef,
}
Expand description
Removes duplicate rows from the input
Fields§
§on_expr: Vec<Expr>
The DISTINCT ON
clause expression list
select_expr: Vec<Expr>
The selected projection expression list
sort_expr: Option<Vec<Sort>>
The ORDER BY
clause, whose initial expressions must match those of the ON
clause when
present. Note that those matching expressions actually wrap the ON
expressions with
additional info pertaining to the sorting procedure (i.e. ASC/DESC, and NULLS FIRST/LAST).
input: Arc<LogicalPlan>
The logical plan that is being DISTINCT’d
schema: DFSchemaRef
The schema description of the DISTINCT ON output
Implementations§
Source§impl DistinctOn
impl DistinctOn
Sourcepub fn try_new(
on_expr: Vec<Expr>,
select_expr: Vec<Expr>,
sort_expr: Option<Vec<SortExpr>>,
input: Arc<LogicalPlan>,
) -> Result<Self>
pub fn try_new( on_expr: Vec<Expr>, select_expr: Vec<Expr>, sort_expr: Option<Vec<SortExpr>>, input: Arc<LogicalPlan>, ) -> Result<Self>
Create a new DistinctOn
struct.
Sourcepub fn with_sort_expr(self, sort_expr: Vec<SortExpr>) -> Result<Self>
pub fn with_sort_expr(self, sort_expr: Vec<SortExpr>) -> Result<Self>
Try to update self
with a new sort expressions.
Validates that the sort expressions are a super-set of the ON
expressions.
Trait Implementations§
Source§impl Clone for DistinctOn
impl Clone for DistinctOn
Source§fn clone(&self) -> DistinctOn
fn clone(&self) -> DistinctOn
Returns a copy 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 Debug for DistinctOn
impl Debug for DistinctOn
Source§impl Hash for DistinctOn
impl Hash for DistinctOn
Source§impl PartialEq for DistinctOn
impl PartialEq for DistinctOn
Source§impl PartialOrd for DistinctOn
impl PartialOrd for DistinctOn
impl Eq for DistinctOn
impl StructuralPartialEq for DistinctOn
Auto Trait Implementations§
impl Freeze for DistinctOn
impl !RefUnwindSafe for DistinctOn
impl Send for DistinctOn
impl Sync for DistinctOn
impl Unpin for DistinctOn
impl !UnwindSafe for DistinctOn
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> 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)
🔬This is a nightly-only experimental API. (
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
Compare self to
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>
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