Struct datafusion_expr::logical_plan::DistinctOn
source · pub struct DistinctOn {
pub on_expr: Vec<Expr>,
pub select_expr: Vec<Expr>,
pub sort_expr: Option<Vec<Expr>>,
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<Expr>>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: DFSchemaRefThe 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<Expr>>,
input: Arc<LogicalPlan>,
) -> Result<Self>
pub fn try_new( on_expr: Vec<Expr>, select_expr: Vec<Expr>, sort_expr: Option<Vec<Expr>>, input: Arc<LogicalPlan>, ) -> Result<Self>
Create a new DistinctOn struct.
sourcepub fn with_sort_expr(self, sort_expr: Vec<Expr>) -> Result<Self>
pub fn with_sort_expr(self, sort_expr: Vec<Expr>) -> 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 Hash for DistinctOn
impl Hash for DistinctOn
source§impl PartialEq for DistinctOn
impl PartialEq for DistinctOn
source§fn eq(&self, other: &DistinctOn) -> bool
fn eq(&self, other: &DistinctOn) -> bool
This method tests for
self and other values to be equal, and is used
by ==.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<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.