Struct datafusion_python::datafusion_expr::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: Arc<DFSchema>,
}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: Arc<DFSchema>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<Expr>>,
input: Arc<LogicalPlan>,
) -> Result<DistinctOn, DataFusionError>
pub fn try_new( on_expr: Vec<Expr>, select_expr: Vec<Expr>, sort_expr: Option<Vec<Expr>>, input: Arc<LogicalPlan>, ) -> Result<DistinctOn, DataFusionError>
Create a new DistinctOn struct.
sourcepub fn with_sort_expr(
self,
sort_expr: Vec<Expr>,
) -> Result<DistinctOn, DataFusionError>
pub fn with_sort_expr( self, sort_expr: Vec<Expr>, ) -> Result<DistinctOn, DataFusionError>
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
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§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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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>
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