struct CustomElement<'a> {
branch_idx: usize,
value: ScalarValue,
ordering: Vec<ScalarValue>,
sort_options: &'a [SortOptions],
}Expand description
This is a wrapper struct to be able to correctly merge ARRAY_AGG data from
multiple partitions using BinaryHeap. When used inside BinaryHeap, this
struct returns smallest CustomElement, where smallest is determined by
ordering values (Vec<ScalarValue>) according to sort_options.
Fields§
§branch_idx: usizeStores the partition this entry came from
value: ScalarValueValues to merge
ordering: Vec<ScalarValue>§sort_options: &'a [SortOptions]Options defining the ordering semantics
Implementations§
Source§impl<'a> CustomElement<'a>
impl<'a> CustomElement<'a>
fn new( branch_idx: usize, value: ScalarValue, ordering: Vec<ScalarValue>, sort_options: &'a [SortOptions], ) -> Self
fn ordering( &self, current: &[ScalarValue], target: &[ScalarValue], ) -> Result<Ordering>
Trait Implementations§
Source§impl<'a> Debug for CustomElement<'a>
impl<'a> Debug for CustomElement<'a>
Source§impl Ord for CustomElement<'_>
impl Ord for CustomElement<'_>
Source§impl<'a> PartialEq for CustomElement<'a>
impl<'a> PartialEq for CustomElement<'a>
Source§impl PartialOrd for CustomElement<'_>
impl PartialOrd for CustomElement<'_>
impl<'a> Eq for CustomElement<'a>
impl<'a> StructuralPartialEq for CustomElement<'a>
Auto Trait Implementations§
impl<'a> Freeze for CustomElement<'a>
impl<'a> !RefUnwindSafe for CustomElement<'a>
impl<'a> Send for CustomElement<'a>
impl<'a> Sync for CustomElement<'a>
impl<'a> Unpin for CustomElement<'a>
impl<'a> !UnwindSafe for CustomElement<'a>
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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