struct TopKRow {
row: Vec<u8>,
batch_id: u32,
index: usize,
}Expand description
Represents one of the top K rows held in this heap. Orders according to memcmp of row (e.g. the arrow Row format, but could also be primitive values)
Reuses allocations to minimize runtime overhead of creating new Vecs
Fields§
§row: Vec<u8>the value of the sort key for this row. This contains the
bytes that could be stored in OwnedRow but uses Vec<u8> to
reuse allocations.
batch_id: u32the RecordBatch this row came from: an id into a RecordBatchStore
index: usizethe index in this record batch the row came from
Implementations§
Source§impl TopKRow
impl TopKRow
Sourcefn new(row: impl AsRef<[u8]>, batch_id: u32, index: usize) -> Self
fn new(row: impl AsRef<[u8]>, batch_id: u32, index: usize) -> Self
Create a new TopKRow with new allocation
Sourcefn with_new_row(
self,
new_row: impl AsRef<[u8]>,
batch_id: u32,
index: usize,
) -> Self
fn with_new_row( self, new_row: impl AsRef<[u8]>, batch_id: u32, index: usize, ) -> Self
Create a new TopKRow reusing the existing allocation
Sourcefn owned_size(&self) -> usize
fn owned_size(&self) -> usize
Returns the number of bytes owned by this row in the heap (not including itself)
Trait Implementations§
Source§impl Ord for TopKRow
impl Ord for TopKRow
Source§impl PartialOrd for TopKRow
impl PartialOrd for TopKRow
impl Eq for TopKRow
impl StructuralPartialEq for TopKRow
Auto Trait Implementations§
impl Freeze for TopKRow
impl RefUnwindSafe for TopKRow
impl Send for TopKRow
impl Sync for TopKRow
impl Unpin for TopKRow
impl UnwindSafe for TopKRow
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