pub struct SortSpec { /* private fields */ }Expand description
A request to sort a relation, sized but not yet executed.
estimated_rows / estimated_bytes are the planner’s only view of the
input magnitude; they need not be exact, but a gross under-estimate
pushes a large sort onto the in-memory path and a gross over-estimate
wastes spill buffers. Callers derive them from cardinality estimates and
per-row width.
Implementations§
Source§impl SortSpec
impl SortSpec
Sourcepub fn new(estimated_rows: u64, estimated_bytes: u64) -> Self
pub fn new(estimated_rows: u64, estimated_bytes: u64) -> Self
Describe a sort of estimated_rows rows totalling roughly
estimated_bytes of key + value bytes.
Sourcepub fn with_dedup(self, dedup: bool) -> Self
pub fn with_dedup(self, dedup: bool) -> Self
Request that equal-key rows be collapsed to one during the merge.
Sourcepub fn labelled(self, label: &'static str) -> Self
pub fn labelled(self, label: &'static str) -> Self
Attach a short static label used in tracing and statistics.
Sourcepub fn estimated_rows(&self) -> u64
pub fn estimated_rows(&self) -> u64
Estimated number of rows to be sorted.
Sourcepub fn estimated_bytes(&self) -> u64
pub fn estimated_bytes(&self) -> u64
Estimated total key + value bytes to be sorted.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SortSpec
impl RefUnwindSafe for SortSpec
impl Send for SortSpec
impl Sync for SortSpec
impl Unpin for SortSpec
impl UnsafeUnpin for SortSpec
impl UnwindSafe for SortSpec
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