pub enum InputOrderMode {
Linear,
PartiallySorted(Vec<usize>),
Sorted,
}Expand description
Specifies how the input to an aggregation or window operator is ordered
relative to their GROUP BY or PARTITION BY expressions.
For example, if the existing ordering is [a ASC, b ASC, c ASC]
§Window Functions
- A
PARTITION BY bclause can useLinearmode. - A
PARTITION BY a, cor aPARTITION BY c, acan usePartiallySorted([0])orPartiallySorted([1])modes, respectively. (The vector stores the index ofain the respective PARTITION BY expression.) - A
PARTITION BY a, bor aPARTITION BY b, acan useSortedmode.
§Aggregations
- A
GROUP BY bclause can useLinearmode. - A
GROUP BY a, cor aGROUP BY BY c, acan usePartiallySorted([0])orPartiallySorted([1])modes, respectively. (The vector stores the index ofain the respective PARTITION BY expression.) - A
GROUP BY a, bor aGROUP BY b, acan useSortedmode.
Note these are the same examples as above, but with GROUP BY instead of
PARTITION BY to make the examples easier to read.
Variants§
Linear
There is no partial permutation of the expressions satisfying the existing ordering.
PartiallySorted(Vec<usize>)
There is a partial permutation of the expressions satisfying the existing ordering. Indices describing the longest partial permutation are stored in the vector.
Sorted
There is a (full) permutation of the expressions satisfying the existing ordering.
Trait Implementations§
source§impl Clone for InputOrderMode
impl Clone for InputOrderMode
source§fn clone(&self) -> InputOrderMode
fn clone(&self) -> InputOrderMode
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 InputOrderMode
impl Debug for InputOrderMode
source§impl PartialEq for InputOrderMode
impl PartialEq for InputOrderMode
source§fn eq(&self, other: &InputOrderMode) -> bool
fn eq(&self, other: &InputOrderMode) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for InputOrderMode
Auto Trait Implementations§
impl RefUnwindSafe for InputOrderMode
impl Send for InputOrderMode
impl Sync for InputOrderMode
impl Unpin for InputOrderMode
impl UnwindSafe for InputOrderMode
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