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 b
clause can useLinear
mode. - A
PARTITION BY a, c
or aPARTITION BY c, a
can usePartiallySorted([0])
orPartiallySorted([1])
modes, respectively. (The vector stores the index ofa
in the respective PARTITION BY expression.) - A
PARTITION BY a, b
or aPARTITION BY b, a
can useSorted
mode.
§Aggregations
- A
GROUP BY b
clause can useLinear
mode, as the only one permutation[b]
cannot satisfy the existing ordering. - A
GROUP BY a, c
or aGROUP BY c, a
can usePartiallySorted([0])
orPartiallySorted([1])
modes, respectively, as the permutation[a]
satisfies the existing ordering. (The vector stores the index ofa
in the respective PARTITION BY expression.) - A
GROUP BY a, b
or aGROUP BY b, a
can useSorted
mode, as the full permutation[a, b]
satisfies the existing ordering.
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
impl StructuralPartialEq for InputOrderMode
Auto Trait Implementations§
impl Freeze for InputOrderMode
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
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<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