pub enum SortProperties {
Ordered(SortOptions),
Unordered,
Singleton,
}
Expand description
To propagate SortOptions
across the PhysicalExpr
, it is insufficient
to simply use Option<SortOptions>
: There must be a differentiation between
unordered columns and literal values, since literals may not break the ordering
when they are used as a child of some binary expression when the other child has
some ordering. On the other hand, unordered columns cannot maintain ordering when
they take part in such operations.
Example: ((a_ordered + b_unordered) + c_ordered) expression cannot end up with sorted data; however the ((a_ordered + 999) + c_ordered) expression can. Therefore, we need two different variants for literals and unordered columns as literals are often more ordering-friendly under most mathematical operations.
Variants§
Ordered(SortOptions)
Use the ordinary SortOptions
struct to represent ordered data:
Unordered
Singleton
Implementations§
Source§impl SortProperties
impl SortProperties
pub fn add(&self, rhs: &SortProperties) -> SortProperties
pub fn sub(&self, rhs: &SortProperties) -> SortProperties
pub fn gt_or_gteq(&self, rhs: &SortProperties) -> SortProperties
pub fn and_or(&self, rhs: &SortProperties) -> SortProperties
Trait Implementations§
Source§impl Clone for SortProperties
impl Clone for SortProperties
Source§fn clone(&self) -> SortProperties
fn clone(&self) -> SortProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SortProperties
impl Debug for SortProperties
Source§impl Default for SortProperties
impl Default for SortProperties
Source§fn default() -> SortProperties
fn default() -> SortProperties
Source§impl Neg for SortProperties
impl Neg for SortProperties
Source§impl PartialEq for SortProperties
impl PartialEq for SortProperties
impl Copy for SortProperties
impl StructuralPartialEq for SortProperties
Auto Trait Implementations§
impl Freeze for SortProperties
impl RefUnwindSafe for SortProperties
impl Send for SortProperties
impl Sync for SortProperties
impl Unpin for SortProperties
impl UnwindSafe for SortProperties
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
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)
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>
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>
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